cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <cr...@4dconcept.fr>
Subject Re: [A SOLUTION] Speicifed the error for the map:handle-error
Date Fri, 18 Jul 2003 12:55:00 GMT
Thanks, it's really fine.



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: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org


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


Mime
View raw message