com.opensymphony.xwork2.interceptor

## Class ExceptionHolder

- java.lang.Object
- - com.opensymphony.xwork2.interceptor.ExceptionHolder

- All Implemented Interfaces:
    Serializable

      public class ExceptionHolder
      extends Object
      implements Serializable

  A simple wrapper around an exception, providing an easy way to print out the stack trace of the exception as well as a way to get a handle on the exception itself.
  Author:
    Matthew E. Porter (matthew dot porter at metissian dot com)
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExceptionHolder(Exception exception)` Holds the given exception

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Exception` | `getException()` Gets the held exception
    `String` | `getExceptionStack()` Gets the held exception stack trace using `Throwable.printStackTrace()`.

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

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

- - ### Constructor Detail

    - #### ExceptionHolder

          public ExceptionHolder(Exception exception)

      Holds the given exception
      Parameters:
        `exception` - the exception to hold.

  - ### Method Detail

    - #### getException

          public Exception getException()

      Gets the held exception
      Returns:
        the held exception

    - #### getExceptionStack

          public String getExceptionStack()

      Gets the held exception stack trace using `Throwable.printStackTrace()`.
      Returns:
        stack trace

Copyright © 2000–2023 Apache Software Foundation. All rights reserved.