public class ValidationException extends RuntimeException
AbstractValidator.
It extends RuntimeException and holds a list of strings payload, allowing the
validator to attach its list of issues to the exception.| Constructor and Description |
|---|
ValidationException(String message,
AbstractValidator validator)
Constructs a validation exception.
|
ValidationException(String message,
AbstractValidator validator,
Throwable cause)
Constructs a validation exception.
|
ValidationException(String message,
List<String> issues)
Constructs a validation exception.
|
ValidationException(String message,
List<String> issues,
Throwable cause)
Constructs a validation exception.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getIssues()
Returns the list of issues associated with this exception.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic ValidationException(String message, AbstractValidator validator)
message - the exception messagevalidator - the validator throwing the exceptionpublic ValidationException(String message, AbstractValidator validator, Throwable cause)
message - the exception messagevalidator - the validator throwing the exceptioncause - an underlying causepublic ValidationException(String message, List<String> issues)
message - the exception messageissues - the list of validation issuesCopyright © 2014. All Rights Reserved.