Michael Melhem wrote:
> Dear Cocoon community,
> 
> It seems to me that pipelines can only handle two error cases: 
 > Namely error 500 (General Exception) and error
 > 404 (ResourceNotFoundException).

Wrong.

> 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?

Yes.

> 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.

Sure.
Make your Exception implement Notifying, and all the information you may 
need is in the generated xml and cen be taken from the environment.

> 
> 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?

There is no need for this.
We just need a selector to select between errors inside handle-errors.

Why didn't you know this?
Because it's poorly documented.
Who is the sucker?
<ducking>  ;-P

Diana, there is a need for docs on error generation.
Where do I start?
(me lazy on docs and Andy Oliver kicks my butt for this ;-)

-- 
Nicola Ken Barozzi                   [EMAIL PROTECTED]
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


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

Reply via email to