Class ValidationException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ValidationException
    extends GrailsException
    Thrown when validation fails during a .save().
    Since:
    1.2
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ValidationException​(java.lang.String msg, org.springframework.validation.Errors e)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String formatErrors​(org.springframework.validation.Errors errors)  
      static java.lang.String formatErrors​(org.springframework.validation.Errors errors, java.lang.String msg)  
      org.springframework.validation.Errors getErrors()  
      java.lang.String getMessage()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ValidationException

        public ValidationException​(java.lang.String msg,
                                   org.springframework.validation.Errors e)
    • Method Detail

      • getErrors

        public org.springframework.validation.Errors getErrors()
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable
      • formatErrors

        public static java.lang.String formatErrors​(org.springframework.validation.Errors errors)
      • formatErrors

        public static java.lang.String formatErrors​(org.springframework.validation.Errors errors,
                                                    java.lang.String msg)