001 /*
002 * Apache License
003 * Version 2.0, January 2004
004 * http://www.apache.org/licenses/
005 *
006 * Copyright 2008 by chenillekit.org
007 *
008 * Licensed under the Apache License, Version 2.0 (the "License");
009 * you may not use this file except in compliance with the License.
010 * You may obtain a copy of the License at
011 *
012 * http://www.apache.org/licenses/LICENSE-2.0
013 *
014 */
015
016 package org.chenillekit.google.utils;
017
018 /**
019 * The JSONException is thrown by the JSON.org classes then things are amiss.
020 *
021 * @author JSON.org
022 * @version 3
023 */
024 public class JSONException extends RuntimeException
025 {
026 private Throwable cause;
027
028 /**
029 * Constructs a JSONException with an explanatory message.
030 *
031 * @param message Detail about the reason for the exception.
032 */
033 public JSONException(String message)
034 {
035 super(message);
036 }
037
038 public JSONException(Throwable t)
039 {
040 super(t.getMessage());
041 this.cause = t;
042 }
043
044 public Throwable getCause()
045 {
046 return this.cause;
047 }
048 }