cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: Default handlers of errors in 2.2?
Date Wed, 13 Aug 2008 16:13:03 GMT
Thorsten Scherler pisze:
> Hmm, hard-coded does not sounds swell. Couldn't we set up an
> error-handler sitemap and then import it to the sitemap that need to use
> the handlers. This way it is still possible to implement your own.

Actually, I've discovered that we do have already such default handling of exceptions hard-coded

into code.
Look at class org.apache.cocoon.servlet.RequestProcessor, and method service(). There a many
to RequestUtil.manageException() which manages some most common exceptions.

The only problematic part is when SourceNotFoundException is being thrown by sitemap component
reader) and not ResourceNotFound. Then pipeline logic will wrap it into ProcessingException
RequestProcessor won't handle such wrapped exception correctly.

I've decided to tweak pipeline implementations to handle SourceNotFoundException correctly.
I hope 
nobody minds.

Grzegorz Kossakowski

View raw message