We extend the AutoExceptionHandler which allows you to have multiple methods
which handle different kinds of exceptions as opposed to checking the
instance of the exception. This will also execute the Resolution if one is
provided. For example:
public class BaseExceptionHandler implements AutoExceptionHandler {
public Resolution handle(final NotFoundException e, final
HttpServletRequest request, final HttpServletResponse response) {
return new ForwardResolution("/NotFound.jsp");
}
public Resolution handle(final AlreadyExistsException e, final
HttpServletRequest request, final HttpServletResponse response) {
return new ForwardResolution("/AlreadyExists.jsp");
}
}
We do also have a generic method that catches Throwable and forwards to a
general error page for errors we are not specifically handling.
--
View this message in context:
http://www.nabble.com/Exception-handling-in-stripes-tp22563861p22668141.html
Sent from the stripes-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users