org.kopitubruk.util.json
Class JSONException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IllegalArgumentException
                  extended by org.kopitubruk.util.json.JSONException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadPropertyNameException, DataStructureLoopException, DuplicatePropertyNameException, JSONParserException, JSONReflectionException, LoopDetectionFailureException, UndefinedCodePointException, UnmatchedSurrogateException

public abstract class JSONException
extends IllegalArgumentException

Holds some redundant code/data for the other exceptions thrown by JSONUtil. All of the exceptions thrown by this package involve problems with arguments, which is why this extends IllegalArgumentException. Also, I prefer unchecked exceptions.

Author:
Bill Davidson
See Also:
Serialized Form

Method Summary
protected  String getClassName(Object obj)
          Get the name of the class of the object.
 String getLocalizedMessage()
           
 String getMessage()
           
 void setLocale(Locale locale)
          Set the locale to be used by getLocalizedMessage()
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setLocale

public void setLocale(Locale locale)
Set the locale to be used by getLocalizedMessage()

Parameters:
locale - the locale to set

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

getLocalizedMessage

public String getLocalizedMessage()
Overrides:
getLocalizedMessage in class Throwable

getClassName

protected String getClassName(Object obj)
Get the name of the class of the object.

Parameters:
obj - the object
Returns:
the class name.


Copyright © 2016. All rights reserved.