Module technology.sola.json
Class InvalidSyntaxException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
technology.sola.json.parser.exception.InvalidSyntaxException
- All Implemented Interfaces:
Serializable
,SolaJsonParsingError
@NullMarked
public class InvalidSyntaxException
extends RuntimeException
implements SolaJsonParsingError
Exception thrown when invalid syntax is discovered during parsing.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidSyntaxException
(Token actual, TokenType... expected) Creates a new instance of this exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
Method Details
-
getLine
public int getLine()- Specified by:
getLine
in interfaceSolaJsonParsingError
- Returns:
- the line where the syntax error began
-
getColumn
public int getColumn()- Specified by:
getColumn
in interfaceSolaJsonParsingError
- Returns:
- the column where the syntax error began
-
getActual
- Returns:
- the received
TokenType
-
getExpected
- Returns:
- the possible
TokenType
s that were expected
-