org.apache.wicket.ajax.json
Class JSONException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.wicket.ajax.json.JSONException
All Implemented Interfaces:
Serializable

public class JSONException
extends RuntimeException

Thrown to indicate a problem with the JSON API. Such problems include:

Although this is a checked exception, it is rarely recoverable. Most callers should simply wrap this exception in an unchecked exception and rethrow:

  public JSONArray toJSONObject() {
     try {
         JSONObject result = new JSONObject();
         ...
     } catch (JSONException e) {
         throw new RuntimeException(e);
     }
 }

See Also:
Serialized Form

Constructor Summary
JSONException(String s)
           
JSONException(String message, Throwable cause)
           
JSONException(Throwable cause)
           
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JSONException

public JSONException(String s)

JSONException

public JSONException(Throwable cause)

JSONException

public JSONException(String message,
                     Throwable cause)


Copyright © 2006–2020 Apache Software Foundation. All rights reserved.