Class ErrorMessage
java.lang.Object
org.apache.commons.digester3.binder.ErrorMessage
An error message and the context in which it occurred. Messages are usually created internally by
Digester and its extensions. Messages can be created explicitly in a module using
addError() statement:
try {
bindRulesFromFile();
} catch (IOException e) {
addError(e);
}-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionErrorMessage(String messagePattern, Object... arguments) Create a newErrorMessageinstance from the error message text.ErrorMessage(String message, Throwable cause) Create a newErrorMessageinstance from the error message text and the related cause. -
Method Summary
-
Field Details
-
message
The error message text. -
cause
The throwable that caused this message.
-
-
Constructor Details
-
ErrorMessage
Create a newErrorMessageinstance from the error message text.- Parameters:
messagePattern- The error message text patternarguments- Arguments referenced by the format specifiers in the format string
-
ErrorMessage
Create a newErrorMessageinstance from the error message text and the related cause.- Parameters:
message- The error message textcause- The throwable that caused this message
-
-
Method Details
-
getMessage
-
getCause
Returns the Throwable that caused this message, ornullif this message was not caused by a Throwable.- Returns:
- The Throwable that caused this message, or
nullif this message was not caused by a Throwable
-
toString
-