|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExceptionHandlerConfig
Generic interface for exception handlers. The default implementation
is DefaultExceptionHandlerConfig
and uses the Struts
exception handling mechanism. In special cases, you may provide your own
implementations of this interface, that may be independent from
the Struts exception handling mechanism.
Exception handler are called if an action throws an exception.
Use ActionTestModule.addExceptionHandler(com.mockrunner.struts.ExceptionHandlerConfig)
to register an exception handler.
Method Summary | |
---|---|
boolean |
canHandle(java.lang.Exception exception)
Returns if this handler is able to handle the exception. |
java.lang.Object |
handle(java.lang.Exception exception,
org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handles the exception. |
Method Detail |
---|
boolean canHandle(java.lang.Exception exception)
true
if this handler is able to handle the exception,
false
otherwisejava.lang.Object handle(java.lang.Exception exception, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
exception
- the exceptionmapping
- the current ActionMapping
form
- the current ActionForm
request
- the current requestresponse
- the current response
ActionForward
,
but may be any object
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |