At 12:10 16/07/2003 -0500, you wrote:
Lionel Crine wrote:I found something working, but I think this is not clean! For any Exception I throw a processingException. Then the <map:handle-errors> gets it. lionel
At 16:03 16/07/2003 +0200, you wrote:
Hi,
I'd the <map:handle-error> to handle my custom exception (not only the 404 and 500).
Where can i do that ?
Is there something to overload?
I read some post on the mailing, and wiki but nothing helps ?
Lionel,
You can do this in your sitemap: <map:components> ...
<map:selector name="exception" src="org.apache.cocoon.selection.XPathExceptionSelector">
<exception name="my-exception" class="org.me.MyException"/>
</map:selector>
...
</map:components>
and then
<map:handle-errors> <map:select type="exception"> <map:when test="my-exception"> <map:generate src="foo.xml"/> <map:transform src="whatever.xsl"/> <map:serialize/> </map:when> </map:select> </map:handle-errors>
This seems to be fairly clean, IMO.
Tony
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
