cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Melhem <micha...@fztig938.bank.dresdner.net>
Subject Re: [PROPOSAL] Extending Sitemap Error Handling
Date Wed, 10 Jul 2002 12:01:40 GMT
On Wed, Jul 10, 2002 at 01:50:29PM +0200, Nicola Ken Barozzi wrote:
> 
> 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.
> 

Hmmm... I didnt know that...I will take a look into this!
Thanks.

Best Regards
Michael Melhem


> >
> >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                   nicolaken@apache.org
>             - verba volant, scripta manent -
>    (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message