Package org.jline.reader
Class SyntaxError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.jline.reader.SyntaxError
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EOFError
Exception thrown when a syntax error is encountered during parsing.
SyntaxError is thrown by the Parser
when it encounters invalid syntax
in the input line. It provides information about the location of the error
(line and column) and a descriptive message about the nature of the error.
This exception is typically caught by the LineReader, which may then display an error message to the user or take other appropriate action based on the parsing context.
The EOFError
subclass is used specifically for incomplete input errors,
such as unclosed quotes or brackets, which might be completed by additional input.
- 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
-
SyntaxError
-
-
Method Details
-
column
public int column()Returns the column position where the syntax error occurred.- Returns:
- the column position (0-based index)
-
line
public int line()Returns the line number where the syntax error occurred.- Returns:
- the line number (0-based index)
-