Vadim Gritsenko wrote:
On Jan 29, 2008, at 11:17 AM, Reinhard Poetz wrote:
o pipeline-specific error handlers don't work
Can you elaborate? As far as I can see all tests are passing fine
http://cocoon.zones.apache.org/demos/trunk/samples/core/errorhandling/
http://cocoon.zones.apache.org/demos/trunk/samples/core/errorhandling/exception/application?code=1
I tried this (see the comment inline):
<map:pipelines>
<!-- ~~~~~~~~~~~~~~~~ error handling ~~~~~~~~~~~~~~~ -->
<map:pipeline>
<map:match pattern="error-handling/custom-error">
<map:act type="error-throwing"/>
<map:generate src="sax-pipeline/simple.xml"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>
<!-- doesn't work: when this per pipeline error handler is active,
it catches ALL errors and the per-sitemap error handler will never
be reached. -->
<map:pipeline>
<map:match
pattern="error-handling/custom-error-per-pipeline-error-handling">
<map:act type="error-throwing"/>
<map:generate src="sax-pipeline/simple.xml"/>
<map:serialize type="xml"/>
</map:match>
<map:handle-errors>
<map:generate src="error-handling/501.xml"/>
<map:serialize type="xhtml" status-code="501"/>
</map:handle-errors>
</map:pipeline>
<map:handle-errors>
<map:select type="custom-exception">
<map:when test="not-found">
<map:generate src="error-handling/404.xml"/>
<map:serialize type="xhtml" status-code="404"/>
</map:when>
<map:when test="custom-exception">
<map:generate src="error-handling/500.xml"/>
<map:serialize type="xhtml" status-code="500"/>
</map:when>
<map:otherwise>
<map:generate src="error-handling/503.xml"/>
<map:serialize type="xhtml" status-code="503"/>
</map:otherwise>
</map:select>
</map:handle-errors>
</map:pipelines>
--
Reinhard Pötz Managing Director, {Indoqa} GmbH
http://www.indoqa.com/en/people/reinhard.poetz/
Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair [EMAIL PROTECTED]
_________________________________________________________________________