Package io.kjson
Class JSONException
-
- All Implemented Interfaces:
-
java.io.Serializable
public class JSONException extends RuntimeException
A base exception class for JSON errors.
Peter Wall
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classJSONException.Companion
-
Constructor Summary
Constructors Constructor Description JSONException(String text, Object key)
-
Method Summary
Modifier and Type Method Description StringgetMessage()final StringgetText()The base text of the message. ObjectgetKey()An optional key, indicating where the error occurred. final JSONExceptionwithCause(Throwable throwable)Add a "cause" Throwable. -
Methods inherited from class kotlin.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getMessage
String getMessage()
-
withCause
final JSONException withCause(Throwable throwable)
Add a "cause" Throwable. This may be called once only, and should usually be called immediately after the creation of the exception.
-
-
-
-