JsonParserError.java

  1. package zserio.runtime.json;

  2. import zserio.runtime.ZserioError;

  3. /**
  4.  * Provides type of exceptions thrown from JSON parser.
  5.  */
  6. public final class JsonParserError extends ZserioError
  7. {
  8.     /**
  9.      * Constructs an empty JSON parser error object.
  10.      */
  11.     public JsonParserError()
  12.     {}

  13.     /**
  14.      * Constructs a new JSON parser error with the given message.
  15.      *
  16.      * @param msg Error message to create from.
  17.      */
  18.     public JsonParserError(final String msg)
  19.     {
  20.         super(msg);
  21.     }

  22.     /**
  23.      * Constructs a new JSON parser error with the given message and throwable object.
  24.      *
  25.      * @param msg Error message to create from.
  26.      * @param throwable Throwable object to create from.
  27.      */
  28.     public JsonParserError(final String msg, final Throwable throwable)
  29.     {
  30.         super(msg, throwable);
  31.     }

  32.     /**
  33.      * Construct a new JSON parser error with the given throwable object.
  34.      *
  35.      * @param throwable Throwable object to create from.
  36.      */
  37.     public JsonParserError(final Throwable throwable)
  38.     {
  39.         super(throwable);
  40.     }

  41.     private static final long serialVersionUID = 921445202560692333L;
  42. }