public class GroovySyntaxError
extends AssertionError
Represents a syntax error of a Groovy program, raised by the lexer or parser.
The message is the diagnostic as produced by the recogniser (for example
Unclosed string literal or Unexpected character: '\u005cu200b').
Line and column are 1-based caret coordinates. On the compiler's normal lexer
path (SyntaxErrorReportable.require with toAttachPositionInfo
false), the location is not part of the message string —
SyntaxException appends
@ line N, column M when wrapping the error. The public
SyntaxErrorReportable.throwSyntaxError path can still append
PositionInfo when toAttachPositionInfo is true (IDE /
highlighter callers).
| Constructor and description |
|---|
GroovySyntaxError(String message, int source, int line, int column) |
| Methods inherited from class | Name |
|---|---|
class AssertionError |
addSuppressed, equals, fillInStackTrace, getCause, getClass, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, hashCode, initCause, notify, notifyAll, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString, wait, wait, wait |
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.