Package nz.org.riskscape.dsl
Class UnexpectedTokenException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
nz.org.riskscape.engine.RiskscapeException
nz.org.riskscape.dsl.ParseException
nz.org.riskscape.dsl.UnexpectedTokenException
- All Implemented Interfaces:
Serializable
Thrown by a Parser when we got a token we weren't expecting
- See Also:
-
Constructor Summary
ConstructorDescriptionUnexpectedTokenException
(Set<? extends TokenType> expected, Token got) UnexpectedTokenException
(Problem customProblem, Set<? extends TokenType> expected, Token got) -
Method Summary
Methods inherited from class nz.org.riskscape.engine.RiskscapeException
getCause, getProblem, hasProblem
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnexpectedTokenException
-
UnexpectedTokenException
-
-
Method Details
-
hasDefaultProblem
public boolean hasDefaultProblem()- Returns:
- true if the problem connected to this exception was supplied by the thrower (i.e. a custom message), or whether it was a default unexpected token problem as generated by the constructor.
-
getExpected
-
getGot
-