cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [PROPOSAL] Extending Sitemap Error Handling
Date Wed, 10 Jul 2002 16:48:35 GMT
Michael Melhem wrote:

>>Currently, an implicit <map:generate type="!notifying-generator!"/> is 
>>added as the first statement of <handle-errors> (see 
>>HandleErrorsNode.invoke() in treeprocessor).
>>
>>What about making this explicit so we can choose other generators as 
>>well, such as a standard file generator to display for example a nice 
>>"page not found" page using some site-wide stylesheets ?
>>
>><handle-errors>
>> <match type="error" pattern="not-found">
>>   <generate type="file" src="notfound.xml"/>
>>   <transform src="skin/doc2html.xsl"/>
>>   <serialize/>
>> </match>
>> <!-- fallback -->
>> <generate type="notifying"/>
>> <transform src="system/error2html.xsl"/>
>> <serialize/>
>></handle-errors>
>>    
>>
>
>I like the idea of an explicit generator in the handle-errors...but doesnt this open up
the sitemap handle-errors block for abuse? 
>  
>

What kind of abuse are you thinking of ?

>Wouldnt the ability to have custom handle-errors generators make it more likely that the
handle-errors pipe would throw the very error/exception thats its trying to handle..and wouldnt
this cause an infinate loop?
>  
>

No risk of infinite loops, as exceptions occuring inside a 
<handle-errors> aren't processed again by the sitemap.

Also, not only generators can throw exceptions, but also matchers, 
transformers, actions, etc. which are allowed in handle-errors.

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies                  Apache Cocoon
  http://www.anyware-tech.com           mailto:sylvain@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