Package com.day.util

Class WrappedRuntimeException

  • All Implemented Interfaces:
    java.io.Serializable

    public abstract class WrappedRuntimeException
    extends java.lang.RuntimeException
    An Exception that wraps another Throwable, and prints its wrapped exception's stack trace as well as its own when printStackTrace is called.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      WrappedRuntimeException​(java.lang.Exception e)
      Class constructor that creates a WrappedException given a root exception
      WrappedRuntimeException​(java.lang.String s)
      Class constructor that creates a WrappedException given a message describing the failure cause
      WrappedRuntimeException​(java.lang.String s, java.lang.Throwable e)
      Class constructor that creates a WrappedException given a message describing the failure cause and a root exception
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getMessage()
      Returns the error message string of this exception.
      java.lang.Throwable getRootException()
      Returns the root exception of this exception.
      void printStackTrace()
      Prints this WrappedException and its backtrace to the standard error stream.
      void printStackTrace​(java.io.PrintStream s)
      Prints this WrappedException and its backtrace to the specified print stream.
      void printStackTrace​(java.io.PrintWriter s)
      Prints this WrappedException and its backtrace to the specified print writer.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WrappedRuntimeException

        public WrappedRuntimeException​(java.lang.String s)
        Class constructor that creates a WrappedException given a message describing the failure cause
        Parameters:
        s - description
      • WrappedRuntimeException

        public WrappedRuntimeException​(java.lang.String s,
                                       java.lang.Throwable e)
        Class constructor that creates a WrappedException given a message describing the failure cause and a root exception
        Parameters:
        s - description
        e - root failure cause
      • WrappedRuntimeException

        public WrappedRuntimeException​(java.lang.Exception e)
        Class constructor that creates a WrappedException given a root exception
        Parameters:
        e - root failure cause
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Returns the error message string of this exception.
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        error message string of this exception.
      • getRootException

        public java.lang.Throwable getRootException()
        Returns the root exception of this exception.
        Returns:
        the root exception of this exception
      • printStackTrace

        public void printStackTrace()
        Prints this WrappedException and its backtrace to the standard error stream.
        Overrides:
        printStackTrace in class java.lang.Throwable
      • printStackTrace

        public void printStackTrace​(java.io.PrintStream s)
        Prints this WrappedException and its backtrace to the specified print stream.
        Overrides:
        printStackTrace in class java.lang.Throwable
        Parameters:
        s - PrintStream to use for output
      • printStackTrace

        public void printStackTrace​(java.io.PrintWriter s)
        Prints this WrappedException and its backtrace to the specified print writer.
        Overrides:
        printStackTrace in class java.lang.Throwable
        Parameters:
        s - PrintWriter to use for output