Package org.apache.struts.chain.commands
Class AbstractExceptionHandler
java.lang.Object
org.apache.struts.chain.commands.ActionCommandBase
org.apache.struts.chain.commands.AbstractExceptionHandler
- All Implemented Interfaces:
org.apache.commons.chain.Command<ActionContext>
,ActionCommand
- Direct Known Subclasses:
ExceptionHandler
Invoke the local or global exception handler configured for the exception class that occurred.
- Version:
- $Rev$ $Date: 2005-11-12 13:01:44 -0500 (Sat, 12 Nov 2005) $
-
Field Summary
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
execute_
(ActionContext actionCtx) Invoke the appropriateAction
for this request, and cache the returnedActionForward
.protected abstract ForwardConfig
handle
(ActionContext context, Exception exception, ExceptionConfig exceptionConfig, ActionConfig actionConfig, ModuleConfig moduleConfig) Perform the required handling of the specified exception.Methods inherited from class org.apache.struts.chain.commands.ActionCommandBase
execute
-
Constructor Details
-
AbstractExceptionHandler
public AbstractExceptionHandler()
-
-
Method Details
-
execute_
Invoke the appropriate
Action
for this request, and cache the returnedActionForward
.- Specified by:
execute_
in classActionCommandBase
- Parameters:
actionCtx
- TheContext
for the current request- Returns:
false
if aForwardConfig
is returned, elsetrue
to complete processing- Throws:
Exception
- if thrown by the Action class and not declared by an Exception Handler
-
handle
protected abstract ForwardConfig handle(ActionContext context, Exception exception, ExceptionConfig exceptionConfig, ActionConfig actionConfig, ModuleConfig moduleConfig) throws Exception Perform the required handling of the specified exception.
- Parameters:
context
- TheContext
for this requestexception
- The exception being handledexceptionConfig
- The correspondingExceptionConfig
actionConfig
- TheActionConfig
for this requestmoduleConfig
- TheModuleConfig
for this request- Returns:
- the
ForwardConfig
to be processed next (if any), ornull
if processing has been completed - Throws:
Exception
- if there are any problems handling the exception
-