java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.darkcollective.relix.parser.ParseException
- All Implemented Interfaces:
Serializable
Thrown by
RelAlgebraParser when the input does not conform to the
relational algebra grammar.
In addition to the standard exception message, a ParseException
exposes the precise source position (line(), column()) and
the offending token (found()) so callers can produce IDE-quality
diagnostics. The diagnostic() method returns a multi-line string
that reproduces the source line with a ^ caret under the error position.
Example message:
Expected ')' at line 3, column 12; found ','
π name, (Users)
^
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ParseException
-
-
Method Details
-
line
public int line() -
column
public int column() -
found
-
diagnostic
-