Thanks much!! This is just what I needed.
Gerry 

-----Original Message-----
From: Jason Johnston [mailto:[EMAIL PROTECTED] 
Sent: Sunday, September 11, 2005 12:44 PM
To: [email protected]
Subject: Re: Expired continuations

Gerry Kaplan wrote:
> Is there a document or an example somewhere that shows how to handle 
> an expired continuation. If the continuation expires and the user 
> tries to continue their work, they get an ugly error page. How can I 
> capture that error? Is it in the flow or in a sitemap?

It's in the sitemap.  You can use the exception selector within your
handle-errors section to catch invalid continuations.  The main sitemap that
ships with the Cocoon distro contains an example of this; here's a snippet
from that sitemap:

<!--+
     | At the very end of a pipeline, you can catch the errors triggered
     | by the pipeline execution. The error handler is an internal sitemap
     | component that, when triggered by an error, takes over the normal
     | pipeline execution.
     | You can here use the "notifying" generator that produces an XML
     | representation and further manipulate this document for presentation
     | on screen.
     | You can also use any other generator if you don't want the
     | error to be displayed on screen. The "exception" selector can help
     | you to define different screens for different error types.
     +-->
<map:handle-errors>
  <map:select type="exception">

   <map:when test="not-found">
    <map:generate type="exception"/>
    <map:transform src="stylesheets/system/exception2html.xslt">
     <map:parameter name="contextPath" value="{request:contextPath}"/>
     <map:parameter name="realPath" value="{realpath:}"/>
     <map:parameter name="pageTitle" value="Resource not found"/>
    </map:transform>
    <map:serialize status-code="404"/>
   </map:when>

   <map:when test="invalid-continuation">
    <map:generate type="exception"/>
    <map:transform src="stylesheets/system/exception2html.xslt">
     <map:parameter name="contextPath" value="{request:contextPath}"/>
     <map:parameter name="realPath" value="{realpath:}"/>
     <map:parameter name="pageTitle" value="Invalid Continuation"/>
    </map:transform>
    <map:serialize status-code="404"/>
   </map:when>

   <map:otherwise>
    <map:generate type="exception"/>
    <map:transform src="stylesheets/system/exception2html.xslt">
     <map:parameter name="contextPath" value="{request:contextPath}"/>
     <map:parameter name="realPath" value="{realpath:}"/>
    </map:transform>
    <map:serialize status-code="500"/>
   </map:otherwise>
  </map:select>

</map:handle-errors>


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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to