Package org.codehaus.groovy.runtime

# Class InvokerInvocationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
groovy.lang.GroovyRuntimeException
org.codehaus.groovy.runtime.InvokerInvocationException

All Implemented Interfaces:
  `Serializable`

public class InvokerInvocationException extends GroovyRuntimeException
Exception thrown when a method invocation targets and throws an exception. Wraps the underlying exception for proper exception chaining.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InvokerInvocationException(InvocationTargetException e)`
  Constructs an InvokerInvocationException from an `InvocationTargetException`.
  `InvokerInvocationException(Throwable cause)`
  Constructs an InvokerInvocationException from any `Throwable`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getMessage()`
  Returns a string representation of this exception message.

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

  `getLocationText, 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

  - ### InvokerInvocationException

    public InvokerInvocationException(InvocationTargetException e)
    Constructs an InvokerInvocationException from an `InvocationTargetException`. Extracts and wraps the underlying target exception.
    Parameters:
      `e` - the `InvocationTargetException` whose target exception will be wrapped

  - ### InvokerInvocationException

    public InvokerInvocationException(Throwable cause)
    Constructs an InvokerInvocationException from any `Throwable`.
    Parameters:
      `cause` - the underlying cause of the invocation failure

- ## Method Details

  - ### getMessage

    public String getMessage()
    Returns a string representation of this exception message. If a cause exists, returns its string representation; otherwise returns the NullPointerException message.
    Overrides:
      `getMessage` in class `GroovyRuntimeException`
    Returns:
      the exception message