Package org.intermine.web.struts
Class InterMineExceptionHandler
- java.lang.Object
-
- org.apache.struts.action.ExceptionHandler
-
- org.intermine.web.struts.InterMineExceptionHandler
-
public class InterMineExceptionHandler extends org.apache.struts.action.ExceptionHandler
InterMine implementation of the Struts ExceptionHandler- Author:
- Andrew Varley
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.log4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description InterMineExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.struts.action.ActionForward
execute(java.lang.Exception ex, org.apache.struts.config.ExceptionConfig ae, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm formInstance, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Handle the exception.protected void
storeException(javax.servlet.http.HttpServletRequest request, java.lang.String property, org.apache.struts.action.ActionMessage message, org.apache.struts.action.ActionForward forward, java.lang.String scope)
Default implementation for handling an ActionMessage generated from an Exception during Action delegation.
-
-
-
Method Detail
-
execute
public org.apache.struts.action.ActionForward execute(java.lang.Exception ex, org.apache.struts.config.ExceptionConfig ae, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm formInstance, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Handle the exception. In this case we traverse the exception chain and report the message from each exception. The original exception and the stack trace are also added to the request.- Overrides:
execute
in classorg.apache.struts.action.ExceptionHandler
- Parameters:
ex
- The exception to handleae
- The ExceptionConfig corresponding to the exceptionmapping
- The ActionMapping we are processingformInstance
- The ActionForm we are processingrequest
- The servlet request we are processingresponse
- The servlet response we are creating- Returns:
- an ActionForward
-
storeException
protected void storeException(javax.servlet.http.HttpServletRequest request, java.lang.String property, org.apache.struts.action.ActionMessage message, org.apache.struts.action.ActionForward forward, java.lang.String scope)
Default implementation for handling an ActionMessage generated from an Exception during Action delegation. The default implementation is to set an attribute of the request or session, as defined by the scope provided (the scope from the exception mapping). An ActionErrors instance is created, the error is added to the collection and the collection is set under the Globals.ERROR_KEY.- Overrides:
storeException
in classorg.apache.struts.action.ExceptionHandler
- Parameters:
request
- - The request we are handlingproperty
- - The property name to use for this errormessage
- - The message generated from the exception mappingforward
- - The forward generated from the input path (from the form or exception mapping)scope
- - The scope of the exception mapping.
-
-