Title: Re: Invalid continuation ID error trapping problem
Ok,
so I have the following in my sitemap:

   <map:selector logger="sitemap.selector.exception" name="exception" src="">      <exception class="org.apache.cocoon.ResourceNotFoundException" name="not-found"/>
     <exception class="org.apache.cocoon.components.flow.InvalidContinuationException" name="invalid-continuation"/>
     <exception class="java.lang.Throwable" unroll="true"/>
   </map:selector>


                        <map:match pattern="invalidContinuation">
                               <map:redirect-to uri="login.xml"/>
                      </map:match>

               <map:handle-errors>
                 <map:select type="exception">
                       <map:when test="invalid-continuation">
                              <map:redirect-to uri="login.xml"/>
                          </map:when>
                 </map:select>
                   </map:handle-errors>

The user is on a page for which the session has ended and they try to refresh a page which holds and expired continuation ID. The above should trap this and redirect the user to the login.xml pipe right? This is not happening in my case as I get the following error message:

cause: org.apache.cocoon.components.flow.InvalidContinuationException: The continuation ID 3a86845140187e14292136292b5578471b10570c is invalid.

Why is the error not being trapped? What am I missing here?

regards

Uzo

Ok,
I have amended my code and still no joy:

   <map:selector logger="sitemap.selector.exception" name="exception" src="">      <exception class="org.apache.cocoon.ResourceNotFoundException" name="not-found"/>
     <exception class="org.apache.cocoon.components.flow.InvalidContinuationException" name="invalid-continuation"/>
     <exception class="java.lang.Throwable" unroll="true"/>
   </map:selector>

.....

                        <map:handle-errors>
                   <map:select type="exception">
                     <map:when test="invalid-continuation">
                    <map:generate src="">                         <map:serialize type="xhtml"/>
                </map:when>
                     <map:when test="not-found">
                       <map:generate src="">                     <map:serialize type="xhtml"/>
                </map:when>
                   </map:select>
                 </map:handle-errors> 

  </map:pipeline>

But whenever I have an expired continuation id or I place a request for a file/pipe that doesn't exist the above error handling does not happen. Why? I am using cocoon 2.1.7 on OS X.

regards

Uzo

Reply via email to