cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From philguillard <philguill...@gmail.com>
Subject Re: How to catch an InvalidContinuationException?
Date Tue, 07 Mar 2006 17:33:16 GMT
This should work, you should be able to generate what you want this way, 
  i did it today. I don't know what is <map:generate type="request"/>, 
but i know you can keep the main sitemap error handling and do a custom 
one in any sub-sitemap.

Phil

Brian Maddy wrote:
> Has anyone successfully been able to catch an 
> InvalidContinuationException?  I've basically copied exactly what is 
> described here:
> http://cocoon.apache.org/2.1/userdocs/flow/tutor.html
> but Cocoon still uses the default handling of an exception (showing the 
> stacktrace and such).  I believe it's the one defined in the root 
> sitemap.  Has anyone else run into this or figured it out?
> 
> In my map:components section:
>    <map:selector name="exception" 
> src="org.apache.cocoon.selection.XPathExceptionSelector">
>      <exception name="invalid-continuation"
>                 
> class="org.apache.cocoon.components.flow.InvalidContinuationException"/>
>      <exception class="java.lang.Throwable" unroll="true"/>
>    </map:selector>
> 
> At the end of my pipeline:
>            <map:match pattern="public/continue-form">
>                <map:call 
> continuation="{request-param:continuation-id}"/>     <!-- exception 
> occurs here -->
>            </map:match>
>    <map:handle-errors>
>      <map:select type="exception">
>        <map:when test="invalid-continuation">
>                <map:generate type="request"/>
>                <map:serialize type="xml"/>
>        </map:when>
>      </map:select>
>    </map:handle-errors>
> 
> Thanks!
> Brian
> 
> 
> ---------------------------------------------------------------------
> 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