cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <Giacomo.P...@pwr.ch>
Subject Re: handle-errors
Date Thu, 20 Jul 2000 19:53:49 GMT
Stefano Mazzocchi wrote:
> 
> Giacomo Pati wrote:
> >
> > I'm thinking of how errors could be handled in a sitemap. The proposed
> > draft states a
> >
> >    <map:handle-errors>
> >     <map:select>
> >      <map:when test="accepts('text/vnd.wap.wml')">
> >       <map:transform src="./styles/Pipeline2WML.xsl"/>
> >       <map:serialize type="wap"/>
> >      </map:when>
> >      <map:otherwise>
> >       <map:transform src="./styles/Pipeline2HTML.xsl"/>
> >       <map:serialize/>
> >      </map:otherwise>
> >     </map:select>
> >    </map:handle-errors>
> >
> > fragment. Now, how about making the now unique error handler a
> > SitemapComponent which gets the Exception thrown and starts spitting
> > SAX events to the pipeline as a special kind of Generator which renders
> > the error to the user?
> 
> Hmmm, an Error handler is a generator that is supposed to XML-ize error
> information to the error-handling pipeline.
> 
> I'm not sure if this needs to be a component, sounds like FS to me. You
> only need one way to XML-ize error information.
> 
> > Any comments?
> 
> Be careful in your "componentization" quest, you might componentize
> something that should not be.

You might be right. After thinking a while over it, it's like you said:
there is probably only one way to XML-ize errors. So there is not really
a need to make it a component.

Giacomo

> 
> --
> Stefano Mazzocchi      One must still have chaos in oneself to be
>                           able to give birth to a dancing star.
> <stefano@apache.org>                             Friedrich Nietzsche
> --------------------------------------------------------------------
>  Missed us in Orlando? Make it up with ApacheCON Europe in London!
> ------------------------- http://ApacheCon.Com ---------------------

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
CH-8166 Niederweningen                    Web:   http://www.pwr.ch

Mime
View raw message