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:
java.io.Serializable
- Direct Known Subclasses:
EOFError
public class SyntaxError extends java.lang.RuntimeException
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:
Parser
,EOFError
,Parser.ParseContext
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SyntaxError(int line, int column, java.lang.String message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
column()
Returns the column position where the syntax error occurred.int
line()
Returns the line number where the syntax error occurred.
-