Class JsonRuntimeException

All Implemented Interfaces:
Serializable, JsonException
Direct Known Subclasses:
JsonFieldSelectorInvalidException, JsonKeyInvalidException, JsonMissingFieldException, JsonParseException, JsonPointerInvalidException

public class JsonRuntimeException extends RuntimeException implements JsonException
Common base type of all unchecked JSON exceptions.
See Also:
  • Constructor Details

  • Method Details

    • newBuilder

      public static JsonExceptionBuilder<JsonRuntimeException> newBuilder(String errorCode)
      Returns a builder for fluently creating instances of JsonRuntimeExceptions..
      Parameters:
      errorCode - a code which uniquely identifies the exception.
      Returns:
      a new builder for JsonRuntimeException objects.
      Throws:
      NullPointerException - if errorCode is null.
      IllegalArgumentException - if errorCode is empty.
    • getErrorCode

      public String getErrorCode()
      Description copied from interface: JsonException
      Returns the error code to uniquely identify this exception.
      Specified by:
      getErrorCode in interface JsonException
      Returns:
      the error code.
    • getDescription

      public Optional<String> getDescription()
      Description copied from interface: JsonException
      Returns the description which should be reported to the user.
      Specified by:
      getDescription in interface JsonException
      Returns:
      the description.
    • getHref

      public Optional<URI> getHref()
      Description copied from interface: JsonException
      Returns a link with which the user can find further information regarding this exception.
      Specified by:
      getHref in interface JsonException
      Returns:
      a link to provide the user with further information about this exception.