java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.helidon.validation.ValidationException
- All Implemented Interfaces:
Serializable
This exception is thrown for validation failures.
It may contain a list of ConstraintViolations.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationException(String message) Create a new exception with a descriptive message.ValidationException(String message, List<ConstraintViolation> violations) Create a new exception with a descriptive message and a list of violations. -
Method Summary
Modifier and TypeMethodDescriptionList of constraint violations that caused this exception, nevernull.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidationException
Create a new exception with a descriptive message.- Parameters:
message- the error message
-
ValidationException
Create a new exception with a descriptive message and a list of violations.- Parameters:
message- the error messageviolations- constraint violations that caused this exception
-
-
Method Details
-
violations
List of constraint violations that caused this exception, nevernull.- Returns:
- list of violations
-