|
Last change
on this file since 6583 was 6484, checked in by Don-vip, 12 years ago |
|
see #7307, fix #8474 - use org.json as lightweight internal json library (already being used by several plugins)
|
|
File size:
1022 bytes
|
| Line | |
|---|
| 1 | package org.json;
|
|---|
| 2 |
|
|---|
| 3 | /**
|
|---|
| 4 | * The JSONException is thrown by the JSON.org classes when things are amiss.
|
|---|
| 5 | *
|
|---|
| 6 | * @author JSON.org
|
|---|
| 7 | * @version 2013-02-10
|
|---|
| 8 | */
|
|---|
| 9 | public class JSONException extends RuntimeException {
|
|---|
| 10 | private static final long serialVersionUID = 0;
|
|---|
| 11 | private Throwable cause;
|
|---|
| 12 |
|
|---|
| 13 | /**
|
|---|
| 14 | * Constructs a JSONException with an explanatory message.
|
|---|
| 15 | *
|
|---|
| 16 | * @param message
|
|---|
| 17 | * Detail about the reason for the exception.
|
|---|
| 18 | */
|
|---|
| 19 | public JSONException(String message) {
|
|---|
| 20 | super(message);
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | /**
|
|---|
| 24 | * Constructs a new JSONException with the specified cause.
|
|---|
| 25 | */
|
|---|
| 26 | public JSONException(Throwable cause) {
|
|---|
| 27 | super(cause.getMessage());
|
|---|
| 28 | this.cause = cause;
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | /**
|
|---|
| 32 | * Returns the cause of this exception or null if the cause is nonexistent
|
|---|
| 33 | * or unknown.
|
|---|
| 34 | *
|
|---|
| 35 | * @returns the cause of this exception or null if the cause is nonexistent
|
|---|
| 36 | * or unknown.
|
|---|
| 37 | */
|
|---|
| 38 | public Throwable getCause() {
|
|---|
| 39 | return this.cause;
|
|---|
| 40 | }
|
|---|
| 41 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.