Class NestedRuntimeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.commons.jelly.util.NestedRuntimeException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
XPathComparator.XPathSortException

public class NestedRuntimeException extends RuntimeException
A RuntimeException which is nested to preserve stack traces. This class allows the following code to be written to convert a regular Exception into a RuntimeException without losing the stack trace.
    try {
        ...
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
 
Version:
$Revision: 155420 $
Author:
James Strachan
See Also:
  • Constructor Details

    • NestedRuntimeException

      public NestedRuntimeException(Throwable cause)
      Constructs a new NestedRuntimeException with specified nested Throwable.
      Parameters:
      cause - the exception or error that caused this exception to be thrown
    • NestedRuntimeException

      public NestedRuntimeException(String msg, Throwable cause)
      Constructs a new NestedRuntimeException with specified detail message and nested Throwable.
      Parameters:
      msg - the error message
      cause - the exception or error that caused this exception to be thrown
  • Method Details