Class ValidationException

All Implemented Interfaces:
Serializable

public class ValidationException extends RuntimeException
Author:
Igor Polevoy
See Also:
Serialized Form
  • Constructor Details

    • ValidationException

      public ValidationException(Validatable validatable)
    • ValidationException

      public ValidationException(String message)
  • Method Details

    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • errors

      public Errors errors()
      Convenience method, returns the same object with errors that is attached to a model generated this exception.
      Returns:
      the same object wit errors that is attached to a model generated this exception
    • errors

      public Errors errors(Locale locale)
      Convenience method, returns the same object with errors that is attached to a model generated this exception.
      Parameters:
      locale - locale in case messages are localized.
      Returns:
      the same object wit errors that is attached to a model generated this exception