[DMAAP-48] Initial code import
[dmaap/datarouter.git] / datarouter-prov / src / main / java / org / json / JSONException.java
diff --git a/datarouter-prov/src/main/java/org/json/JSONException.java b/datarouter-prov/src/main/java/org/json/JSONException.java
new file mode 100644 (file)
index 0000000..2308eb2
--- /dev/null
@@ -0,0 +1,63 @@
+/*******************************************************************************\r
+ * ============LICENSE_START==================================================\r
+ * * org.onap.dmaap\r
+ * * ===========================================================================\r
+ * * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
+ * * ===========================================================================\r
+ * * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * * you may not use this file except in compliance with the License.\r
+ * * You may obtain a copy of the License at\r
+ * * \r
+ *  *      http://www.apache.org/licenses/LICENSE-2.0\r
+ * * \r
+ *  * Unless required by applicable law or agreed to in writing, software\r
+ * * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * * See the License for the specific language governing permissions and\r
+ * * limitations under the License.\r
+ * * ============LICENSE_END====================================================\r
+ * *\r
+ * * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
+ * *\r
+ ******************************************************************************/\r
+package org.json;\r
+\r
+/**\r
+ * The JSONException is thrown by the JSON.org classes when things are amiss.\r
+ *\r
+ * @author JSON.org\r
+ * @version 2013-02-10\r
+ */\r
+public class JSONException extends RuntimeException {\r
+    private static final long serialVersionUID = 0;\r
+    private Throwable cause;\r
+\r
+    /**\r
+     * Constructs a JSONException with an explanatory message.\r
+     *\r
+     * @param message\r
+     *            Detail about the reason for the exception.\r
+     */\r
+    public JSONException(String message) {\r
+        super(message);\r
+    }\r
+\r
+    /**\r
+     * Constructs a new JSONException with the specified cause.\r
+     */\r
+    public JSONException(Throwable cause) {\r
+        super(cause.getMessage());\r
+        this.cause = cause;\r
+    }\r
+\r
+    /**\r
+     * Returns the cause of this exception or null if the cause is nonexistent\r
+     * or unknown.\r
+     *\r
+     * @return the cause of this exception or null if the cause is nonexistent\r
+     *          or unknown.\r
+     */\r
+    public Throwable getCause() {\r
+        return this.cause;\r
+    }\r
+}\r