Package org.codehaus.groovy.syntax

# Class RuntimeParserException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
groovy.lang.GroovyRuntimeException
org.codehaus.groovy.syntax.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:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RuntimeParserException(String message, ASTNode node)`
  Constructs a RuntimeParserException from an error message and AST node.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `throwParserException()`
  Converts this runtime exception to a checked `SyntaxException`.

  ### Methods inherited from class groovy.lang.GroovyRuntimeException

  `getLocationText, getMessage, getMessageWithoutLocationText, getModule, getNode, setModule`

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## 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