On Aug 13, 2008, at 7:42 AM, Thorsten Scherler wrote:

On Wed, 2008-08-13 at 12:12 +0200, Grzegorz Kossakowski wrote:
Hi,

In 2.1 every sitemap was mounted by root sitemap and thus mounted sitemap inherited various settings
like components configuration or map:handle-errors declarations.

By contrast, in 2.2 every sitemap is independent and self-contained so it does not inherit any kind of default declaration of error handlers. This is somehow problematic, because now if pipeline throws SourceNotFound exception there is no handler for this exception and Cocoon always returns 500 (Internal Server Error) response status code. This is obviously wrong and the only way to fix it is to declare map:handle-errors section in every sitemap which is rather inconvenient.

Needs to be done only in the root sitemap of a block, isn't it?


I started to think about some kind of default minimalistic handler for basic exceptions that would
be hard-coded into SitemapServlet.

I see that you already discovered fallback error handling mechanism. It does exist for scenarios when error handling for some reason was not implemented in the sitemap, or if sitemap could not be loaded or processed.


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.

+1

Vadim

Reply via email to