Class ValidationException

  • All Implemented Interfaces:
    Serializable

    public class ValidationException
    extends SchemaException
    Encapsulate a JSON validator error.

    This exception may include information for locating the error in the original JSON document object. Note that although the application will receive a ValidationException as the argument to the handlers in the ErrorHandler interface, the application is not actually required to throw the exception; instead, it can simply read the information in it and take a different action.

    Since this exception is a subclass of SchemaException, it inherits the ability to wrap another exception.

    See Also:
    SchemaException, Serialized Form
    • Constructor Detail

      • ValidationException

        public ValidationException​(String string)
        Create an exception with the given message.
        Parameters:
        string - The message.
      • ValidationException

        public ValidationException​(String string,
                                   Throwable throwable)
        Create an exception with the given message and cause.
        Parameters:
        string - The message.
        throwable - The cause.
      • ValidationException

        public ValidationException​(String string,
                                   Throwable throwable,
                                   JsonPointer path)
        Create an exception with the given message, cause and path.
        Parameters:
        string - The message.
        throwable - The cause.
        path - The path.
      • ValidationException

        public ValidationException​(String message,
                                   JsonPointer path)
        Create an exception with the given message and path.
        Parameters:
        message - The message.
        path - The path.
      • ValidationException

        public ValidationException​(String message,
                                   JsonPointer path,
                                   Object value)
        Create an exception with the given message, value and path.
        Parameters:
        message - The message.
        path - The path.
        value - The value.
      • ValidationException

        public ValidationException​(Exception e,
                                   JsonPointer path)
        Create an exception with the given cause and path.
        Parameters:
        e - The cause.
        path - The path.
      • ValidationException

        public ValidationException​(String message,
                                   Exception e,
                                   JsonPointer path)
        Create an exception with the given message, cause and path.
        Parameters:
        message - The message.
        e - The cause.
        path - The path.