Package org.projog.core.parser
Class ParserException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.projog.core.ProjogException
-
- org.projog.core.parser.ParserException
-
- All Implemented Interfaces:
java.io.Serializable
public class ParserException extends ProjogException
Signals a failure to successfully parse Prolog syntax.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private intcolumnNumberprivate java.lang.Stringlineprivate intlineNumberprivate java.lang.Stringmessageprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description ParserException(java.lang.String message, CharacterParser parser)ParserException(java.lang.String message, CharacterParser parser, java.lang.Throwable t)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumnNumber()Returns the index in the line being parsed of the character being parsed when the problem occurred.voidgetDescription(java.io.PrintStream out)Prints a description of this exception to the specified print stream.java.lang.StringgetLine()Returns the contents of the line being parsed when the problem occurred.intgetLineNumber()Returns the line number of the line being parsed when the problem occurred.-
Methods inherited from class org.projog.core.ProjogException
addClause, getClauses
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
message
private final java.lang.String message
-
line
private final java.lang.String line
-
lineNumber
private final int lineNumber
-
columnNumber
private final int columnNumber
-
-
Constructor Detail
-
ParserException
ParserException(java.lang.String message, CharacterParser parser)
-
ParserException
ParserException(java.lang.String message, CharacterParser parser, java.lang.Throwable t)
-
-
Method Detail
-
getLine
public java.lang.String getLine()
Returns the contents of the line being parsed when the problem occurred.
-
getLineNumber
public int getLineNumber()
Returns the line number of the line being parsed when the problem occurred.
-
getColumnNumber
public int getColumnNumber()
Returns the index in the line being parsed of the character being parsed when the problem occurred.
-
getDescription
public void getDescription(java.io.PrintStream out)
Prints a description of this exception to the specified print stream.The description contains the particular line being parsed when the exception was thrown.
- Parameters:
out-PrintStreamto use for output
-
-