net.sourceforge.stripes.exception
Interface AutoExceptionHandler


public interface AutoExceptionHandler

A marker interface for delegate exception handlers to be used with the DelegatingExceptionHandler. Note that the DelegatingExceptionHandler must be configured as the ExceptionHandler for the application in order for AutoExceptionHandlers to be discovered and used.

AutoExceptionHandlers can define one or more methods to handle different kinds of exceptions. Each method must have the following signature:

public Resolution handle(Type exception, HttpServletRequest req, HttpServletResponse res);

where Type can be any subclass of Throwable. Handler methods do not have to follow any naming convention. In the above example 'handle' is used, but any other name, e.g. 'run', 'handleException' etc. would have worked as well. The return type is only loosely enforced; if the method returns an object and it is a Resolution then it will be executed, otherwise it will be ignored.

Since:
Stripes 1.3
Author:
Jeppe Cramon



? Copyright 2005-2006, Stripes Development Team.