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 newPairedExceptionfrom the two throwablesPairedException(Throwable t1, Throwable t2)Constructs a newPairedExceptionfrom the two throwables
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLocalizedMessage()StringgetMessage()ThrowablegetSecondCause()Gets the second cause in this paired exceptionStackTraceElement[]getSecondStackTrace()Gets the second cause’s stack trace in this paired exceptionvoidprintStackTrace()voidprintStackTrace(PrintStream s)voidprintStackTrace(PrintWriter s)StringtoString()-
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 newPairedExceptionfrom the two throwables- Parameters:
t1- The first throwablet2- The second throwable
-
PairedException
public PairedException(String message, Throwable t1, Throwable t2)
Constructs a newPairedExceptionfrom the two throwables- Parameters:
t1- The first throwablet2- The second throwable
-
-
Method Detail
-
getLocalizedMessage
public String getLocalizedMessage()
- Overrides:
getLocalizedMessagein classThrowable
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
getSecondCause
public Throwable getSecondCause()
Gets the second cause in this paired exception- Returns:
- The second cause
-
getSecondStackTrace
public StackTraceElement[] getSecondStackTrace()
Gets the second cause’s stack trace in this paired exception- Returns:
- The second cause’s stack trace
-
printStackTrace
public void printStackTrace(PrintWriter s)
- Overrides:
printStackTracein classThrowable
-
printStackTrace
public void printStackTrace()
- Overrides:
printStackTracein classThrowable
-
printStackTrace
public void printStackTrace(PrintStream s)
- Overrides:
printStackTracein classThrowable
-
-