Package com.identityworksllc.iiq.common
Class PairedException
- java.lang.Object
-
- java.lang.Throwable
-
- com.identityworksllc.iiq.common.PairedException
-
- All Implemented Interfaces:
Serializable
public final class PairedException extends Throwable
This exception is to be used whenever an exception is caught inside of a catch block.It will display details of both exceptions on printStackTrace and other methods.
The first exception will be treated like any other “cause” passed to an exception, so it will be returned by
Throwable.getCause()
, while the second exception will be stored separately ast2
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PairedException(String message, Throwable t1, Throwable t2)
Constructs a newPairedException
from the two throwablesPairedException(Throwable t1, Throwable t2)
Constructs a newPairedException
from the two throwables
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLocalizedMessage()
String
getMessage()
Throwable
getSecondCause()
StackTraceElement[]
getSecondStackTrace()
void
printStackTrace()
void
printStackTrace(PrintStream s)
void
printStackTrace(PrintWriter s)
String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, setStackTrace
-
-
-
-
Constructor Detail
-
PairedException
public PairedException(Throwable t1, Throwable t2)
Constructs a newPairedException
from the two throwables- Parameters:
t1
- The first throwablet2
- The second throwable
-
PairedException
public PairedException(String message, Throwable t1, Throwable t2)
Constructs a newPairedException
from the two throwables- Parameters:
t1
- The first throwablet2
- The second throwable
-
-
Method Detail
-
getLocalizedMessage
public String getLocalizedMessage()
- Overrides:
getLocalizedMessage
in classThrowable
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getSecondCause
public Throwable getSecondCause()
-
getSecondStackTrace
public StackTraceElement[] getSecondStackTrace()
-
printStackTrace
public void printStackTrace(PrintWriter s)
- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
public void printStackTrace()
- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
public void printStackTrace(PrintStream s)
- Overrides:
printStackTrace
in classThrowable
-
-