Hello Mariusz,

Yes, you can. You need to have an exception element in the exception selector element for each custom exception type you throw:

<map:selector logger="navigation.sitemap.selector.exception"
name="exception" src="org.apache.cocoon.selection.ExceptionSelector">
<exception class="com.mycompany.FooException"
name="foo-exception"
unroll="true"/>
...


and then in the map:handle-errors something like:

<map:handle-errors>
<map:select type="exception">
<map:when test="foo-exception">
<map:generate src="fooerror.xsp" type="serverpages"/>
<map:transform type="cinclude"/>
<map:transform src="html/site2html.xsl">
<map:parameter name="language" value="de"/>
<map:parameter name="pageTitle" value=": Sorry - Foo Exception!"/>
<map:parameter name="httpPrefix" value="{global:http}{request:contextPath}"/>
<map:parameter name="httpsPrefix" value="{global:https}{request:contextPath}"/>
</map:transform>
<map:transform type="i18n">
<map:parameter name="locale" value="de"/>
</map:transform>
<map:serialize status-code="500"/>
</map:when>


Hope that helps,

John


Mariusz W�jcik wrote:
Hi

Can I throw my own ApplicationException from XSP file ? I'd like to throw it, and catch it in pipeline by using <map:handle-errors> component. Every time I got message "Unhalted Exception ....". What I should do ? It is possible to do ?
Thanks for help
mario



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to