Class ValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.forgerock.json.JsonException
-
- org.forgerock.json.JsonValueException
-
- org.forgerock.json.schema.validator.exceptions.SchemaException
-
- org.forgerock.json.schema.validator.exceptions.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 Summary
Constructors Constructor Description ValidationException(Exception e, JsonPointer path)
Create an exception with the given cause and path.ValidationException(String string)
Create an exception with the given message.ValidationException(String message, Exception e, JsonPointer path)
Create an exception with the given message, cause and path.ValidationException(String string, Throwable throwable)
Create an exception with the given message and cause.ValidationException(String string, Throwable throwable, JsonPointer path)
Create an exception with the given message, cause and path.ValidationException(String message, JsonPointer path)
Create an exception with the given message and path.ValidationException(String message, JsonPointer path, Object value)
Create an exception with the given message, value and path.
-
Method Summary
-
Methods inherited from class org.forgerock.json.schema.validator.exceptions.SchemaException
getException, getMessage, toString
-
Methods inherited from class org.forgerock.json.JsonValueException
getJsonValue
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
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.
-
-