com.mongodb.util
Class JSONParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.mongodb.util.JSONParseException
All Implemented Interfaces:
Serializable

public class JSONParseException
extends RuntimeException

Exception throw when invalid JSON is passed to JSONParser. This exception creates a message that points to the first offending character in the JSON string:

 { "x" : 3, "y" : 4, some invalid json.... }
                     ^
 

See Also:
Serialized Form

Constructor Summary
JSONParseException(String s, int pos)
           
JSONParseException(String s, int pos, Throwable cause)
           
 
Method Summary
 String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

JSONParseException

public JSONParseException(String s,
                          int pos)

JSONParseException

public JSONParseException(String s,
                          int pos,
                          Throwable cause)
Method Detail

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable