Package com.jsgalactic.axiom.error
Class ValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.jsgalactic.axiom.error.AxiomException
com.jsgalactic.axiom.error.UnprocessableContentException
com.jsgalactic.axiom.error.ValidationException
- All Implemented Interfaces:
Serializable
A syntactically valid request whose content breaks application rules (422). The framework does
not throw this yet; applications may throw it with field violations.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionValidationException(List<Violation> violations) Creates the exception with codevalidation_failed. -
Method Summary
Modifier and TypeMethodDescriptionReturns field-level details sent to clients; empty unless a subtype provides them.Methods inherited from class com.jsgalactic.axiom.error.AxiomException
code, headers, statusMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ValidationException
Creates the exception with codevalidation_failed.- Parameters:
violations- at most 100 field violations- Throws:
IllegalArgumentException- if more than 100 violations are supplied
-
-
Method Details
-
violations
Description copied from class:AxiomExceptionReturns field-level details sent to clients; empty unless a subtype provides them.- Overrides:
violationsin classAxiomException- Returns:
- immutable violations
-