Class SchemaException
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
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ValidationException
Encapsulate a general JSON validator error.
If the validator needs to include information about a
specific location in an JSON document, it should use the
ValidationException subclass.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSchemaException(JsonValue value, Exception e) Create a new SchemaException wrapping an existing exception.SchemaException(JsonValue value, String message) Create the exception with the given value and message.SchemaException(JsonValue value, String message, Exception e) Create a new SchemaException from an existing exception.SchemaException(JsonValue value, String message, Throwable throwable) Create the exception with the given value, message and cause. -
Method Summary
Modifier and TypeMethodDescriptionReturn the embedded exception, if any.Return a detail message for this exception.toString()Override toString to pick up any embedded exception.Methods inherited from class org.forgerock.json.JsonValueException
getJsonValueMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
SchemaException
Create the exception with the given value and message.- Parameters:
value- The value.message- The message.
-
SchemaException
Create the exception with the given value, message and cause.- Parameters:
value- The value.message- The message.throwable- The cause.
-
SchemaException
Create a new SchemaException wrapping an existing exception.The existing exception will be embedded in the new one, and its message will become the default message for the SchemaException.
- Parameters:
value- The value.e- The exception to be wrapped in a SchemaException.
-
SchemaException
Create a new SchemaException from an existing exception.The existing exception will be embedded in the new one, but the new exception will have its own message.
- Parameters:
value- The value.message- The detail message.e- The exception to be wrapped in a SchemaException.
-
-
Method Details
-
getMessage
Return a detail message for this exception.If there is an embedded exception, and if the SchemaException has no detail message of its own, this method will return the detail message from the embedded exception.
- Overrides:
getMessagein classJsonValueException- Returns:
- The error or warning message.
-
getException
Return the embedded exception, if any.- Returns:
- The embedded exception, or null if there is none.
-
toString
Override toString to pick up any embedded exception.
-