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 calls to RequestUtil.manageException() which manages some most common exceptions.

The only problematic part is when SourceNotFoundException is being thrown by sitemap component (like reader) and not ResourceNotFound. Then pipeline logic will wrap it into ProcessingException and 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

Reply via email to