Package: org.codehaus.groovy.syntax

## [Java] Class ParserException

- org.codehaus.groovy.syntax.ParserException

-     public class ParserException
      extends TokenException

  Exception thrown when a parse error is encountered by the parser. Extends TokenException to provide token-aware error reporting with position information from the parse stream.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `ParserException(String message, Token token)` Constructs a ParserException from a token and error message.
    `ParserException(String message, Throwable cause, int lineNumber, int columnNumber)` Constructs a ParserException with explicit position and a cause.
    `ParserException(String message, Throwable cause, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber)` Constructs a ParserException with explicit position range and a cause.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class SyntaxException` | `getEndColumn, getEndLine, getLine, getMessage, getOriginalMessage, getSourceLocator, getStartColumn, getStartLine, setSourceLocator`
    `class GroovyException` | `isFatal, setFatal`

- - ### Constructor Detail

    - #### public ParserException(String message, Token token)

      Constructs a ParserException from a token and error message.

      Parameters:
        `message` - the error message
        `token` - the Token where the error occurred

    - #### public ParserException(String message, Throwable cause, int lineNumber, int columnNumber)

      Constructs a ParserException with explicit position and a cause.

      Parameters:
        `message` - the error message
        `cause` - the underlying Throwable that caused this exception
        `lineNumber` - the line number where the error occurs (1-based)
        `columnNumber` - the column number where the error occurs (1-based)

    - #### public ParserException(String message, Throwable cause, int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber)

      Constructs a ParserException with explicit position range and a cause.

      Parameters:
        `message` - the error message
        `cause` - the underlying Throwable that caused this exception
        `lineNumber` - the starting line number (1-based)
        `columnNumber` - the starting column number (1-based)
        `endLineNumber` - the ending line number (1-based)
        `endColumnNumber` - the ending column number (1-based)