PageRenderTime 304ms CodeModel.GetById 181ms app.highlight 3ms RepoModel.GetById 118ms app.codeStats 0ms

/src/org/json/JSONException.java

http://github.com/nddrylliog/ooc
Java | 33 lines | 16 code | 5 blank | 12 comment | 0 complexity | 76a8bac31388d3572dcfd61928fc5e7e MD5 | raw file
 1package org.json;
 2
 3/**
 4 * The JSONException is thrown by the JSON.org classes when things are amiss.
 5 * @author JSON.org
 6 * @version 2008-09-18
 7 */
 8public class JSONException extends Exception {
 9    /**
10	 * 
11	 */
12	private static final long serialVersionUID = 5894276831604379907L;
13	
14	private Throwable cause;
15
16    /**
17     * Constructs a JSONException with an explanatory message.
18     * @param message Detail about the reason for the exception.
19     */
20    public JSONException(String message) {
21        super(message);
22    }
23
24    public JSONException(Throwable t) {
25        super(t.getMessage());
26        this.cause = t;
27    }
28
29    @Override
30	public Throwable getCause() {
31        return this.cause;
32    }
33}