> From: Peter Royal [mailto:[EMAIL PROTECTED]]
> 
> 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 -> [EMAIL PROTECTED]


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

Reply via email to