cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: error handling !*#%!
Date Tue, 19 Mar 2002 16:49:49 GMT
> From: Peter Royal [mailto:proyal@managingpartners.com]
> 
> On Tuesday 19 March 2002 08:11 am, Jeremy Quinn wrote:
> > Has anyone got examples they can send me of how they have
implemented
> > error-handling in the sitemap, the samples are not very revealing
.....
> 
> No samples to send but I can describe :)

That's sounds like a good practice worth of documenting (hint ;)

Couple of comments:


> Due to how Cocoon processes, I do all processing that I know might
generate
> exceptions inside Actions, so the handle-errors pipeline can catch
them. I
> then do my best to ensure that no exceptions will occur during the
> generation/transformation stages.

Transformers with side effects (sql, ldap, xmldb, etc) can be
implemented not to fail hard with exception, but return an element
containing error which occurred. Then following stylesheet can process
result of transformer and output appropriate message. (IIRC,
XMLDBTransformer outputs success/failure result as an element).


> If you're lucky, and do you do get an error
> once the pipeline has started, as long as the response has not been
commited,

You can increase your changes (and decrease perceived performance) by
boosting serializer buffer size.


> you can still get a redirect to the handle-errors pipeline safely.
> -pete


Vadim

> --
> peter royal -> proyal@managingpartners.com


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message