Class ImixsExceptionHandler

java.lang.Object
org.imixs.workflow.exceptions.ImixsExceptionHandler

public class ImixsExceptionHandler extends Object
The ExceptionHandler provides a method to add a error message to the given workItem, based on the data in a WorkflowException or InvalidAccessException. This kind of error message can be displayed in a page evaluating the properties '$error_code' and '$error_message'. These attributes will not be stored.

If a PluginException or ValidationException contains an optional object array the message is parsed for params to be replaced

Example: $error_message=Value should not be greater than {0} or lower as {1}.

Author:
rsoika
  • Constructor Details

    • ImixsExceptionHandler

      public ImixsExceptionHandler()
  • Method Details

    • addErrorMessage

      public static ItemCollection addErrorMessage(Exception pe, ItemCollection aworkitem)
      This method adds a error message to the given workItem, based on the data in a WorkflowException or InvalidAccessException.
      Parameters:
      pe -
    • findCauseUsingPlainJava

      public static Throwable findCauseUsingPlainJava(Throwable throwable)
      Find the Root Cause Using Plain Java

      We'll loop through all the causes until it reaches the root. Notice that we've added an extra condition in our loop to avoid infinite loops when handling recursive causes.

      Parameters:
      throwable -
      Returns: