Package org.imixs.workflow.exceptions
Class ImixsExceptionHandler
java.lang.Object
org.imixs.workflow.exceptions.ImixsExceptionHandler
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.static Throwable
findCauseUsingPlainJava
(Throwable throwable) Find the Root Cause Using Plain Java
-
Constructor Details
-
ImixsExceptionHandler
public ImixsExceptionHandler()
-
-
Method Details
-
addErrorMessage
This method adds a error message to the given workItem, based on the data in a WorkflowException or InvalidAccessException.- Parameters:
pe
-
-
findCauseUsingPlainJava
Find the Root Cause Using Plain JavaWe'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:
-