Class RuntimeParserException

All Implemented Interfaces:
Serializable

public class RuntimeParserException extends GroovyRuntimeException
A runtime exception wrapper for parser errors, allowing parser exceptions to be thrown from contexts that cannot throw checked exceptions. Can be converted back to a SyntaxException when needed for proper error handling.
See Also:
  • Constructor Details

    • RuntimeParserException

      public RuntimeParserException(String message, ASTNode node)
      Constructs a RuntimeParserException from an error message and AST node. The node's position information is included in the error message.
      Parameters:
      message - the error message
      node - the ASTNode where the error occurred
  • Method Details

    • throwParserException

      public void throwParserException() throws SyntaxException
      Converts this runtime exception to a checked SyntaxException. Extracts position information from the associated AST node.
      Throws:
      SyntaxException - containing the error details from this runtime exception