Package org.apache.commons.validator
Class ValidatorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.commons.validator.ValidatorException
- All Implemented Interfaces:
Serializable
The base exception for the Validator Framework. All other
Exceptions thrown during calls to
Validator.validate() are considered errors.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an Exception with no specified detail message.ValidatorException(String message) Constructs an Exception with the specified detail message. -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringinvalidCode(String code) Convenient message text "Invalid code [invalidCode]." with no additional informationstatic final StringinvalidCode(String code, String detail) Convenient message text "Invalid code [invalidCode], additional information", f.i.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
START_WITH_INVALID
Common prefix for messages, f.i. "Invalid Code ...", "Invalid Character ..."- See Also:
-
-
Constructor Details
-
ValidatorException
public ValidatorException()Constructs an Exception with no specified detail message. -
ValidatorException
Constructs an Exception with the specified detail message.- Parameters:
message- The error message.
-
-
Method Details
-
invalidCode
Convenient message text "Invalid code [invalidCode]." with no additional information- Parameters:
code- the invalid code- Returns:
- the message text
-
invalidCode
Convenient message text "Invalid code [invalidCode], additional information", f.i. Invalid code "", too short- Parameters:
code- the invalid codedetail- optional additional information- Returns:
- the message text
-