Top Description Fields Constructors Methods
org.jparsec.error

public Class ParserException

extends RuntimeException
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
org.jparsec.ParseTree, .Parser

Is thrown when any grammar error happens or any exception is thrown during parsing.
Author
Ben Yu

Field Summary

Modifier and TypeField and Description
private final ParseErrorDetails
private final Location
location

References Deprecated Location is deprecated or references (maybe indirectly) at least one deprecated element.
private final String
module

Deprecated
private ParseTree

Constructor Summary

AccessConstructor and Description
public
ParserException(ParseErrorDetails
the ParseErrorDetails that describes the error details.
details
,
Location
the error location.
location
)
References Deprecated Location is deprecated or references (maybe indirectly) at least one deprecated element.

Creates a ParserException object.

public
ParserException(ParseErrorDetails
the ParseErrorDetails that describes the error details.
details
,
String
the module name.
moduleName
,
Location
the error location.
location
)
Deprecated

Creates a ParserException object.

public
ParserException(Throwable
the exception that causes this.
cause
,
ParseErrorDetails
the ParseErrorDetails that describes the error details.
details
,
String
the module name.
moduleName
,
Location
the location.
location
)
Deprecated

Creates a ParserException object.

Method Summary

Modifier and TypeMethod and Description
public final int
getColumn()

Returns the column where the error occurred.

public ParseErrorDetails
getErrorDetails()

Returns the detailed description of the error, or null if none.

public final int
getLine()

Returns the line where the error occurred.

public Location
getLocation()
Deprecated Use getLine and getColumn instead.

Returns the location of the error.

public String
getModuleName()
Deprecated

Returns the module name, or null if none.

public ParseTree
getParseTree()

Returns the parse tree until the parse error happened, when parseTree() was invoked.

public void
private static String
toErrorMessage(String message, String module, ParseErrorDetails details, Location location)
References Deprecated Location is deprecated or references (maybe indirectly) at least one deprecated element.

Field Detail

errorback to summary
private final ParseErrorDetails error
locationback to summary
private final Location location

References Deprecated

Location is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

moduleback to summary
private final String module

Deprecated

Annotations
@Deprecated
parseTreeback to summary
private ParseTree parseTree

Constructor Detail

ParserExceptionback to summary
public ParserException(ParseErrorDetails details, Location location)

References Deprecated

Location is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Creates a ParserException object.

Parameters
details:ParseErrorDetails

the ParseErrorDetails that describes the error details.

location:Location

the error location.

ParserExceptionback to summary
public ParserException(ParseErrorDetails details, String moduleName, Location location)

Deprecated

Creates a ParserException object.

Parameters
details:ParseErrorDetails

the ParseErrorDetails that describes the error details.

moduleName:String

the module name.

location:Location

the error location.

Annotations
@Deprecated
ParserExceptionback to summary
public ParserException(Throwable cause, ParseErrorDetails details, String moduleName, Location location)

Deprecated

Creates a ParserException object.

Parameters
cause:Throwable

the exception that causes this.

details:ParseErrorDetails

the ParseErrorDetails that describes the error details.

moduleName:String

the module name.

location:Location

the location.

Annotations
@Deprecated

Method Detail

getColumnback to summary
public final int getColumn()

Returns the column where the error occurred.

Since
3.1
getErrorDetailsback to summary
public ParseErrorDetails getErrorDetails()

Returns the detailed description of the error, or null if none.

getLineback to summary
public final int getLine()

Returns the line where the error occurred.

Since
3.1
getLocationback to summary
public Location getLocation()

Deprecated

Use getLine and getColumn instead.

Returns the location of the error.

Annotations
@Deprecated
getModuleNameback to summary
public String getModuleName()

Deprecated

Returns the module name, or null if none.

Annotations
@Deprecated
getParseTreeback to summary
public ParseTree getParseTree()

Returns the parse tree until the parse error happened, when parseTree() was invoked. null if absent.

Since
2.3
setParseTreeback to summary
public void setParseTree(ParseTree parseTree)
Since
2.3
toErrorMessageback to summary
private static String toErrorMessage(String message, String module, ParseErrorDetails details, Location location)

References Deprecated

Location is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.