Class ParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.pnfsoftware.jeb.util.encoding.json.parser.ParseException
- All Implemented Interfaces:
Serializable
ParseException explains why and where the error occurs in source JSON text.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionParseException
(int errorType) ParseException
(int errorType, Object unexpectedObject) ParseException
(long position, int errorType, Object unexpectedObject) -
Method Summary
Modifier and TypeMethodDescriptionint
long
void
setErrorType
(int errorType) void
setPosition
(int position) void
setUnexpectedObject
(Object unexpectedObject) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ERROR_UNEXPECTED_CHAR
public static final int ERROR_UNEXPECTED_CHAR- See Also:
-
ERROR_UNEXPECTED_TOKEN
public static final int ERROR_UNEXPECTED_TOKEN- See Also:
-
ERROR_UNEXPECTED_EXCEPTION
public static final int ERROR_UNEXPECTED_EXCEPTION- See Also:
-
-
Constructor Details
-
ParseException
public ParseException(int errorType) -
ParseException
-
ParseException
-
-
Method Details
-
getErrorType
public int getErrorType() -
setErrorType
public void setErrorType(int errorType) -
getPosition
public long getPosition()- Returns:
- The character position (starting with 0) of the input where the error occurs.
- See Also:
-
JSONParser.getPosition()
-
setPosition
public void setPosition(int position) -
getUnexpectedObject
- Returns:
- 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
- See Also:
-
Yytoken
-
setUnexpectedObject
-
getMessage
- Overrides:
getMessage
in classThrowable
-