Package com.oorian.data.binding
Class BindingValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.oorian.data.binding.BindingValidationException
- All Implemented Interfaces:
Serializable
Thrown by
Binder.writeBean(Object) when one or more field bindings fail validation.
The exception carries a map of ValidationResult objects keyed by the bound
InputElement, allowing the caller to display targeted error messages.
- Since:
- 2.1
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBindingValidationException(Map<InputElement<?>, ValidationResult> fieldErrors) Creates a new BindingValidationException with the given field errors. -
Method Summary
Modifier and TypeMethodDescriptionReturns the validation errors keyed by the bound field.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BindingValidationException
Creates a new BindingValidationException with the given field errors.- Parameters:
fieldErrors- a map of field-to-validation-result entries
-
-
Method Details
-
getFieldErrors
Returns the validation errors keyed by the bound field.- Returns:
- an unmodifiable map of field-to-validation-result entries
-