Dear Cocoon community,

It seems to me that pipelines can only handle two error cases: Namely error 500 
(General Exception) and error 404 (ResourceNotFoundException).

There appears to be no way currently to handle specific errors that might be thrown by 
pipeline components other than to render a general Error 500 page. Am I mistaken?

For example, it may be the case that a custom built generator could throw custom 
Exceptions that a developer would like to handle in a specific fashion.

To that end, I propose that pipeline be extendend so that it they can handle X number 
of errors depending on the amount of <map:handle-errors> defined in the sitemap for 
that pipeline.

<sitemap>
  ...

  <map:handle-errors type="500">
    <map:transform src="stylesheets/error2html.xsl"/>
    <map:serialize/>
   </map:handle-errors>

   <map:handle-errors type="404">
    <map:transform src="stylesheets/error2html.xsl"/>
    <map:serialize />
   </map:handle-errors>

   <!-- one more or extra error-handles -->
   <map:handle-errors type="someSpecificException">
    <-- "type" here could me some sort of short code or the actual
        full name of the Exception class? -->
    <map:transform src="stylesheets/SpecificError2html.xsl"/>
    <map:serialize status-code="500"/>
   </map:handle-errors>

   etc..
</sitemap>

Does anyone see any problems with this approach? Comments?

Best Regards,
Michael Melhem



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

Reply via email to