Package org.codehaus.groovy.syntax
Class TokenMismatchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.codehaus.groovy.GroovyException
org.codehaus.groovy.syntax.SyntaxException
org.codehaus.groovy.syntax.TokenException
org.codehaus.groovy.syntax.TokenMismatchException
- All Implemented Interfaces:
Serializable,GroovyExceptionInterface
Exception thrown when a parser encounters a token of an unexpected type.
Contains information about both the unexpected token found and the expected token type.
Extends
TokenException to inherit token-based error reporting.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTokenMismatchException(Token token, int expectedType) Constructs a TokenMismatchException. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the token type that was expected.Returns the unexpected token that triggered this exception.Methods inherited from class org.codehaus.groovy.syntax.SyntaxException
getEndColumn, getEndLine, getLine, getMessage, getOriginalMessage, getSourceLocator, getStartColumn, getStartLine, setSourceLocatorMethods inherited from class org.codehaus.groovy.GroovyException
isFatal, setFatalMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
Method Details