cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <colle...@umn.edu>
Subject Re: [Authentication Framework] handle-errors
Date Thu, 11 Dec 2003 22:25:49 GMT
Ralph Goers wrote:

> I'm using 2.1.3.
> 
> My authentication pipeline calls a generator which in turn calls JAAS.  When
> login fails I'd like to catch the LoginException using handle-errors in the
> sitemap.  Although I don't get any errors I never see the error handling
> happen.  Is handle-errors supported in that context?

If you're not seeing a stacktrace on the LoginException (i.e. it is not 
being propagated all the way to the top), you might have to catch it in 
your generator and then re-throw it from generate(), which should allow 
the ExceptionSelector to see it:

   <map:selector
      logger="sitemap.selector.exception"
      name="exception"
      src="org.apache.cocoon.selection.ExceptionSelector">

      <exception
        class="org.whatever.LoginException"
        name="invalid-login"/>
   </map:selector>


If you wanted to get fancy, you could catch the LoginException and throw 
your own custom Exception from your generator, and tell the 
ExceptionSelector about the new one.

> 
> Ralph Goers


Regards,

Tony


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message