Package org.jparsec.error
Class ParserException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jparsec.error.ParserException
- All Implemented Interfaces:
Serializable
Is thrown when any grammar error happens or any exception is thrown during parsing.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionParserException(Throwable cause, ParseErrorDetails details, String moduleName, Location location) Deprecated.ParserException(ParseErrorDetails details, String moduleName, Location location) Deprecated.ParserException(ParseErrorDetails details, Location location) Creates aParserExceptionobject. -
Method Summary
Modifier and TypeMethodDescriptionfinal intReturns the column where the error occurred.Returns the detailed description of the error, ornullif none.final intgetLine()Returns the line where the error occurred.Deprecated.Deprecated.Returns the parse tree until the parse error happened, whenparseTree()was invoked.voidsetParseTree(ParseTree parseTree) private static StringtoErrorMessage(String message, String module, ParseErrorDetails details, Location location) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
error
-
location
-
parseTree
-
module
Deprecated.
-
-
Constructor Details
-
ParserException
Creates aParserExceptionobject.- Parameters:
details- theParseErrorDetailsthat describes the error details.location- the error location.
-
ParserException
Deprecated.Creates aParserExceptionobject.- Parameters:
details- theParseErrorDetailsthat describes the error details.moduleName- the module name.location- the error location.
-
ParserException
@Deprecated public ParserException(Throwable cause, ParseErrorDetails details, String moduleName, Location location) Deprecated.Creates aParserExceptionobject.- Parameters:
cause- the exception that causes this.details- theParseErrorDetailsthat describes the error details.moduleName- the module name.location- the location.
-
-
Method Details
-
getErrorDetails
Returns the detailed description of the error, ornullif none. -
getParseTree
Returns the parse tree until the parse error happened, whenparseTree()was invoked.nullif absent.- Since:
- 2.3
-
setParseTree
- Since:
- 2.3
-
toErrorMessage
private static String toErrorMessage(String message, String module, ParseErrorDetails details, Location location) -
getModuleName
Deprecated.Returns the module name, ornullif none. -
getLocation
Deprecated.UsegetLine()andgetColumn()instead.Returns the location of the error. -
getLine
public final int getLine()Returns the line where the error occurred.- Since:
- 3.1
-
getColumn
public final int getColumn()Returns the column where the error occurred.- Since:
- 3.1
-
getLine()andgetColumn()instead.