public class JsonParseException extends RuntimeException
This exception is a RuntimeException
because it is exposed to the client. Using a
RuntimeException
avoids bad coding practices on the client side where they catch the
exception and do nothing. It is often the case that you want to blow up if there is a parsing
error (i.e. often clients do not know how to recover from a JsonParseException
.
Constructor and Description |
---|
JsonParseException(String msg)
Creates exception with the specified message.
|
JsonParseException(String msg,
Throwable cause)
Creates exception with the specified message and cause.
|
JsonParseException(Throwable cause)
Creates exception with the specified cause.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public JsonParseException(String msg)
JsonParseException(String, Throwable)
instead.msg
- error message describing a possible cause of this exception.public JsonParseException(String msg, Throwable cause)
msg
- error message describing what happened.cause
- root exception that caused this exception to be thrown.public JsonParseException(Throwable cause)
JsonParseException(String, Throwable)
instead if you can describe what happened.cause
- root exception that caused this exception to be thrown.Copyright © 2017. All Rights Reserved.