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 and Description
    --- | ---
    `protected JsonPointer` | `inputScope`
    `protected Schema` | `schema`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ValidationException(String message, String keyword, Object input)`
    `protected` | `ValidationException(String message, Throwable cause, String keyword, Object input)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ValidationException` | `create(String message, String keyword, Object input)`
    `static ValidationException` | `create(String message, String keyword, Object input, Collection<Throwable> causes)`
    `static ValidationException` | `create(String message, String keyword, Object input, Throwable cause)`
    `static ValidationException` | `createException(String message, String keyword, Object input)` Deprecated. just use `create(String, String, Object)`
    `static ValidationException` | `createException(String message, String keyword, Object input, Collection<Throwable> causes)` Deprecated. just use `create(String, String, Object, Collection)`
    `static ValidationException` | `createException(String message, String keyword, Object input, Throwable cause)` Deprecated. just use `create(String, String, Object, Throwable)`
    `Object` | `input()`
    `JsonPointer` | `inputScope()`
    `String` | `keyword()`
    `Schema` | `schema()`
    `JsonPointer` | `scope()` Deprecated. use `schema()` and then `Schema.getScope()` instead
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### schema

          protected Schema schema

    - #### inputScope

          protected JsonPointer inputScope

  - ### Constructor Detail

    - #### ValidationException

          protected ValidationException(String message,
                                        String keyword,
                                        Object input)

    - #### ValidationException

          protected ValidationException(String message,
                                        Throwable cause,
                                        String keyword,
                                        Object input)

  - ### Method Detail

    - #### createException

          @Deprecated
          public static ValidationException createException(String message,
                                                                        String keyword,
                                                                        Object input,
                                                                        Collection<Throwable> causes)

      Deprecated. just use `create(String, String, Object, Collection)`

    - #### createException

          @Deprecated
          public static ValidationException createException(String message,
                                                                        String keyword,
                                                                        Object input,
                                                                        Throwable cause)

      Deprecated. just use `create(String, String, Object, Throwable)`

    - #### createException

          @Deprecated
          public static ValidationException createException(String message,
                                                                        String keyword,
                                                                        Object input)

      Deprecated. just use `create(String, String, Object)`

    - #### 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

    - #### schema

          public Schema schema()

      Returns:
        the schema that failed the validation

    - #### scope

          @Deprecated
          public JsonPointer scope()

      Deprecated. use `schema()` and then `Schema.getScope()` instead
      Returns:
        the scope of the schema that failed the validation

    - #### inputScope

          public JsonPointer inputScope()

      Returns:
        the scope of the input, where the validation failed.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Throwable`

Copyright © 2021 Eclipse. All rights reserved.