public class

ParseException

extends Exception
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ com.pnfsoftware.jeb.util.encoding.json.parser.ParseException

Class Overview

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

Summary

Constants
int ERROR_UNEXPECTED_CHAR
int ERROR_UNEXPECTED_EXCEPTION
int ERROR_UNEXPECTED_TOKEN
Public Constructors
ParseException(int errorType)
ParseException(int errorType, Object unexpectedObject)
ParseException(long position, int errorType, Object unexpectedObject)
Public Methods
int getErrorType()
String getMessage()
long getPosition()
Object getUnexpectedObject()
void setErrorType(int errorType)
void setPosition(int position)
void setUnexpectedObject(Object unexpectedObject)
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Constants

public static final int ERROR_UNEXPECTED_CHAR

Constant Value: 0 (0x00000000)

public static final int ERROR_UNEXPECTED_EXCEPTION

Constant Value: 2 (0x00000002)

public static final int ERROR_UNEXPECTED_TOKEN

Constant Value: 1 (0x00000001)

Public Constructors

public ParseException (int errorType)

public ParseException (int errorType, Object unexpectedObject)

public ParseException (long position, int errorType, Object unexpectedObject)

Public Methods

public int getErrorType ()

public String getMessage ()

public long getPosition ()

Returns
  • The character position (starting with 0) of the input where the error occurs.
See Also

public Object 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
  • org.json.simple.parser.Yytoken

public void setErrorType (int errorType)

public void setPosition (int position)

public void setUnexpectedObject (Object unexpectedObject)