Class ParserException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.oracle.js.parser.ParserException
- All Implemented Interfaces:
Serializable
-
Constructor Summary
ConstructorsConstructorDescriptionParserException(JSErrorType errorType, String msg, Source source, int line, int column, long token) Constructor.ParserException(String msg) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintGet the column for thisParserException.Get theJSErrorTypeof thisParserException.Get the source file name for thisParserException.intGet the line number for thisParserException.intGet token position within source where the error originated.Get theSourceof thisParserException.longgetToken()Get the token responsible for thisParserException.booleanvoidsetColumnNumber(int column) Set the column for thisParserException.voidsetFileName(String fileName) Set the source file name for thisParserException.voidsetLineNumber(int line) Set the line number for thisParserException.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ParserException
Constructor.- Parameters:
msg- exception message for this parser error.
-
ParserException
public ParserException(JSErrorType errorType, String msg, Source source, int line, int column, long token) Constructor.- Parameters:
errorType- error typemsg- exception messagesource- source from which this exception originatesline- line number of exceptioncolumn- column number of exceptiontoken- token from which this exception originates
-
-
Method Details
-
getFileName
Get the source file name for thisParserException.- Returns:
- the file name
-
setFileName
Set the source file name for thisParserException.- Parameters:
fileName- the file name
-
getLineNumber
public int getLineNumber()Get the line number for thisParserException.- Returns:
- the line number
-
setLineNumber
public void setLineNumber(int line) Set the line number for thisParserException.- Parameters:
line- the line number
-
getColumnNumber
public int getColumnNumber()Get the column for thisParserException.- Returns:
- the column number
-
setColumnNumber
public void setColumnNumber(int column) Set the column for thisParserException.- Parameters:
column- the column number
-
getSource
-
getToken
public long getToken()Get the token responsible for thisParserException.- Returns:
- token
-
getPosition
public int getPosition()Get token position within source where the error originated.- Returns:
- token position if available, else -1
-
getErrorType
-
isIncompleteSource
public boolean isIncompleteSource() -
getRawMessage
-
getMessage
- Overrides:
getMessagein classThrowable
-