Class WorkflowExceptionHandler

  • Direct Known Subclasses:
    UIBasedWorkflowExceptionHandler

    public class WorkflowExceptionHandler
    extends Object
    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 Detail

      • myShouldThrowException

        protected boolean myShouldThrowException
        The my should throw exception.
    • Constructor Detail

      • 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 Detail

      • logException

        protected void logException​(Exception e)
        log the exception. Can be overriden in subclasses. Default implementation does nothing here
        Parameters:
        e - the exception to log
      • handleCriticalException

        protected void handleCriticalException​(Exception e)
        handle critical exceptions. either throws the exception or presents it to the user with an error dialog
        Parameters:
        e - the exception to handle
      • handleJobFailed

        public void handleJobFailed​(JobFailedException e)
        handle the case when a job fails.
        Parameters:
        e - the exception containing more information
      • handleCleanupFailed

        public void handleCleanupFailed​(CleanupFailedException e)
        handle the case when the cleanup of a job fails.
        Parameters:
        e - the exception containing more information
      • handleUserCanceled

        public void handleUserCanceled​(UserCanceledException e)
        handle the case when a the user chooses to cancel a job.
        Parameters:
        e - the exception containing more information
      • handleFatalFailure

        public void handleFatalFailure​(Exception e)
        Handles a non-recoverable exception which is not declared in the interface (e.g., runtime exceptions).
        Parameters:
        e - The exception to handle