Package io.vertx.json.schema
Class ValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.vertx.core.VertxException
-
- io.vertx.json.schema.ValidationException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ValidationExceptionImpl
public abstract class ValidationException extends VertxException
This is the main class for every Validation flow related errors- Author:
- Francesco Guardiani @slinkydeveloper
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected JsonPointerinputScope
-
Constructor Summary
Constructors Modifier Constructor Description protectedValidationException(String message, String keyword, Object input)protectedValidationException(String message, String keyword, Object input, boolean noStackTrace)protectedValidationException(String message, Throwable cause, String keyword, Object input)protectedValidationException(String message, Throwable cause, String keyword, Object input, boolean noStackTrace)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValidationExceptioncreate(String message, String keyword, Object input)static ValidationExceptioncreate(String message, String keyword, Object input, Throwable cause)static ValidationExceptioncreate(String message, String keyword, Object input, Collection<Throwable> causes)Objectinput()JsonPointerinputScope()Stringkeyword()StringtoString()-
Methods inherited from class io.vertx.core.VertxException
noStackTrace, noStackTrace, noStackTrace
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Field Detail
-
inputScope
protected JsonPointer inputScope
-
-
Method Detail
-
create
public static ValidationException create(String message, String keyword, Object input, Collection<Throwable> causes)
-
create
public static ValidationException create(String message, String keyword, Object input, Throwable cause)
-
create
public static ValidationException create(String message, String keyword, Object input)
-
keyword
public String keyword()
- Returns:
- the keyword that failed the validation, if any
-
input
public Object input()
- Returns:
- the input that triggered the error
-
inputScope
public JsonPointer inputScope()
- Returns:
- the scope of the input, where the validation failed.
-
-