cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Maddy <bma...@kampersoftware.com>
Subject How to catch an InvalidContinuationException?
Date Tue, 07 Mar 2006 18:06:33 GMT
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


Mime
View raw message