org.appfuse.webapp.action
Class ActionExceptionHandler
java.lang.Object
org.apache.struts.action.ExceptionHandler
org.appfuse.webapp.action.ActionExceptionHandler
public final class ActionExceptionHandler
- extends ExceptionHandler
Implementation of ExceptionHandler that
handles any Exceptions that are bubbled up to the Action
layer. This allows us to remove generic try/catch statements
from our Action Classes.
View Source
- Author:
- Matt Raible
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActionExceptionHandler
public ActionExceptionHandler()
execute
public ActionForward execute(Exception ex,
ExceptionConfig ae,
ActionMapping mapping,
ActionForm formInstance,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException
- This method handles any java.lang.Exceptions that are not
caught in previous classes. It will loop through and get
all the causes (exception chain), create ActionErrors,
add them to the request and then forward to the input.
- Overrides:
execute
in class ExceptionHandler
- Throws:
ServletException
- See Also:
(
java.lang.Exception,
org.apache.struts.config.ExceptionConfig,
org.apache.struts.action.ActionMapping,
org.apache.struts.action.ActionForm,
javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse
)
storeException
protected void storeException(HttpServletRequest request,
String property,
ActionMessage error,
ActionForward forward)
- This method overrides the the ExceptionHandler's storeException
method in order to create more than one error message.
- Parameters:
request
- - The request we are handlingproperty
- - The property name to use for this errorerror
- - The error generated from the exception mappingforward
- - The forward generated from the input path
(from the form or exception mapping)
logException
protected void logException(Exception ex)
- Overrides logException method in ExceptionHandler to print the stackTrace
- Overrides:
logException
in class ExceptionHandler
- See Also:
ExceptionHandler.logException(java.lang.Exception)
Copyright � 2002-2006