Class BindingValidationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.oorian.data.binding.BindingValidationException
All Implemented Interfaces:
Serializable

public class BindingValidationException extends Exception
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 Details

    • BindingValidationException

      public BindingValidationException(Map<InputElement<?>,ValidationResult> fieldErrors)
      Creates a new BindingValidationException with the given field errors.
      Parameters:
      fieldErrors - a map of field-to-validation-result entries
  • Method Details

    • getFieldErrors

      public Map<InputElement<?>,ValidationResult> getFieldErrors()
      Returns the validation errors keyed by the bound field.
      Returns:
      an unmodifiable map of field-to-validation-result entries