Package: org.codehaus.groovy.syntax

## [Java] Class ReadException

- org.codehaus.groovy.syntax.ReadException

-     public class ReadException
      extends GroovyException

  Exception that wraps I/O exceptions (IOException) in a Groovy-specific context. Provides convenient access to the underlying I/O cause while maintaining the GroovyException hierarchy.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `ReadException(IOException cause)` Constructs a ReadException from an I/O exception.
    `ReadException(String message, IOException cause)` Constructs a ReadException from a message and an I/O exception.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public IOException` | `getIOCause()` Returns the underlying I/O cause of this exception.
    `` | `public String` | `getMessage()` Returns the exception message.
    `` | `public String` | `toString()` Returns a string representation of this exception.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GroovyException` | `isFatal, setFatal`

- - ### Constructor Detail

    - #### public ReadException(IOException cause)

      Constructs a ReadException from an I/O exception. No specific message is provided.

      Parameters:
        `cause` - the IOException that triggered this exception

    - #### public ReadException(String message, IOException cause)

      Constructs a ReadException from a message and an I/O exception.

      Parameters:
        `message` - the error message
        `cause` - the underlying IOException that triggered this exception

  - ### Method Detail

    - #### public IOException getIOCause()

      Returns the underlying I/O cause of this exception.

      Returns:
        the IOException that caused this exception

    - #### public String getMessage()

      Returns the exception message. Equivalent to toString() for this exception type.

      Returns:
        the exception message or I/O cause message

    - #### public String toString()

      Returns a string representation of this exception. If no custom message was provided, returns the cause's message.

      Returns:
        the exception message or I/O cause message