> Am Don, 2003-02-13 um 17.20 schrieb Jeroen Cranendonk:
> > Our company is currently building a project around cocoon(yay:) and
xmlforms.
> > We are using the current development cvs version.
> > Working on this it occured to me that the prepare and perform methods of
> > the AbstractXMLFormAction class don't allow the throwing of any
exceptions
> > whatsoever.
> > My question is if this is by design or by error, and how I should handle
any
> > errors occuring in my implementations of prepare and perform.
> > (And if this is by error and not design, if anyone feels like fixin it
soon
> > ^.^ )
>
> you mean the perform( ) method does not declare a checked exception?
I mean AbstractXMLFormAction.java says :
perform();
and not
perform() throws someExceptions;

> first:
> you can use the following trick to throw always an exception
>
> try {
>
> } catch ( Throwable t ) {
> throw new RuntimeException( t ) ;
> }
>
> this works, since RuntimeException and subclasses don't need to occur in
> the signature.
Sounds good, I'll try that :)
will this still be cought more upwards by cocoon tho, so it can generate a
cocoon
error page ? (using <map:handle-errors>, that's what I want really )

> if you want to say that the form has an error, you are better up using
> the Form.addViolations( ... ) method.
>
> for more info on Violations look into
> org.apache.cocoon.components.validation.Violation
I want to report an error more sever then a violation, like a db failing or
so,
or a coders messup ^.^
violations are really only for when the user input on a form is bad right ?

>
> hope this helps
>
> -- Jakob
>
Thankies for the interest :)
 Jeroen


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to