cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Praher <>
Subject Re: XMLForms prepare/perform nothrow
Date Thu, 13 Feb 2003 17:46:45 GMT
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? 

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.

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

hope this helps

-- Jakob

> Many thanks in advance for any replies,
> 	Jeroen Cranendonk,
> 		eMAXX software developer.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message