Package com.day.util

Class WrappedException

  • All Implemented Interfaces:
    Serializable

    public abstract class WrappedException
    extends Exception
    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 Detail

      • WrappedException

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

        public WrappedException​(String s,
                                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
      • WrappedException

        public WrappedException​(Throwable t)
        Class constructor that creates a WrappedException given a root exception
        Parameters:
        t - root failure cause
    • Method Detail

      • getMessage

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

        public 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 Throwable
      • printStackTrace

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

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