org.json.simple.parser
类 ParseException

java.lang.Object
  继承者 java.lang.Throwable
      继承者 java.lang.Exception
          继承者 org.json.simple.parser.ParseException
所有已实现的接口:
java.io.Serializable

public class ParseException
extends java.lang.Exception

ParseException explains why and where the error occurs in source JSON text.

作者:
FangYidong
另请参见:
序列化表格

字段摘要
static int ERROR_UNEXPECTED_CHAR
           
static int ERROR_UNEXPECTED_EXCEPTION
           
static int ERROR_UNEXPECTED_TOKEN
           
 
构造方法摘要
ParseException(int errorType)
           
ParseException(int position, int errorType, java.lang.Object unexpectedObject)
           
ParseException(int errorType, java.lang.Object unexpectedObject)
           
 
方法摘要
 int getErrorType()
           
 int getPosition()
           
 java.lang.Object getUnexpectedObject()
           
 void setErrorType(int errorType)
           
 void setPosition(int position)
           
 void setUnexpectedObject(java.lang.Object unexpectedObject)
           
 java.lang.String toString()
           
 
从类 java.lang.Throwable 继承的方法
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

ERROR_UNEXPECTED_CHAR

public static final int ERROR_UNEXPECTED_CHAR
另请参见:
常量字段值

ERROR_UNEXPECTED_TOKEN

public static final int ERROR_UNEXPECTED_TOKEN
另请参见:
常量字段值

ERROR_UNEXPECTED_EXCEPTION

public static final int ERROR_UNEXPECTED_EXCEPTION
另请参见:
常量字段值
构造方法详细信息

ParseException

public ParseException(int errorType)

ParseException

public ParseException(int errorType,
                      java.lang.Object unexpectedObject)

ParseException

public ParseException(int position,
                      int errorType,
                      java.lang.Object unexpectedObject)
方法详细信息

getErrorType

public int getErrorType()

setErrorType

public void setErrorType(int errorType)

getPosition

public int getPosition()
返回:
The character position (starting with 0) of the input where the error occurs.
另请参见:
JSONParser.getPosition()

setPosition

public void setPosition(int position)

getUnexpectedObject

public java.lang.Object getUnexpectedObject()
返回:
One of the following base on the value of errorType: ERROR_UNEXPECTED_CHAR java.lang.Character ERROR_UNEXPECTED_TOKEN org.json.simple.parser.Yytoken ERROR_UNEXPECTED_EXCEPTION java.lang.Exception
另请参见:
Yytoken

setUnexpectedObject

public void setUnexpectedObject(java.lang.Object unexpectedObject)

toString

public java.lang.String toString()
覆盖:
java.lang.Throwable 中的 toString


Copyright © 2012. All Rights Reserved.