Package de.uka.ipd.sdq.workflow
Class WorkflowExceptionHandler
java.lang.Object
de.uka.ipd.sdq.workflow.WorkflowExceptionHandler
- Direct Known Subclasses:
UIBasedWorkflowExceptionHandler
Implementation of a work flow exception handler. Serious failures are logged and presented to the
user with an error dialog.
No action is taken if the user cancels the work flow or any of the jobs.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
The my should throw exception. -
Constructor Summary
ConstructorDescriptionWorkflowExceptionHandler
(boolean shouldThrowException) Create a UI independent workflow exception handler. -
Method Summary
Modifier and TypeMethodDescriptionvoid
handle the case when the cleanup of a job fails.protected void
handle critical exceptions.void
Handles a non-recoverable exception which is not declared in the interface (e.g., runtime exceptions).void
handle the case when a job fails.void
handle the case when a the user chooses to cancel a job.protected void
log the exception.
-
Field Details
-
myShouldThrowException
protected boolean myShouldThrowExceptionThe my should throw exception.
-
-
Constructor Details
-
WorkflowExceptionHandler
public WorkflowExceptionHandler(boolean shouldThrowException) Create a UI independent workflow exception handler.- Parameters:
shouldThrowException
- If true the workflow exception handler does not handle the exception but throws a new exception. This is usefull for batch runs or test cases.
-
-
Method Details
-
logException
log the exception. Can be overriden in subclasses. Default implementation does nothing here- Parameters:
e
- the exception to log
-
handleCriticalException
handle critical exceptions. either throws the exception or presents it to the user with an error dialog- Parameters:
e
- the exception to handle
-
handleJobFailed
handle the case when a job fails.- Parameters:
e
- the exception containing more information
-
handleCleanupFailed
handle the case when the cleanup of a job fails.- Parameters:
e
- the exception containing more information
-
handleUserCanceled
handle the case when a the user chooses to cancel a job.- Parameters:
e
- the exception containing more information
-
handleFatalFailure
Handles a non-recoverable exception which is not declared in the interface (e.g., runtime exceptions).- Parameters:
e
- The exception to handle
-