issrg.utils
Class ExceptionPairException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by issrg.utils.ExceptionPairException
All Implemented Interfaces:
java.io.Serializable

public class ExceptionPairException
extends java.lang.Exception

This exception is designed for use within a multithreaded environment, where you may wish to collect all the exceptions that any threads have ever thrown, and display them as one. By embedding ExceptionPairException in ExceptionPairException arbitrary number of exceptions can be linked into a single exception.

Version:
1.0
Author:
A Otenko
See Also:
Serialized Form

Constructor Summary
ExceptionPairException()
           
ExceptionPairException(java.lang.Throwable e, java.lang.Throwable e2)
          This constructor builds ExceptionPairException from a pair of Throwables.
 
Method Summary
 void printStackTrace(java.io.PrintStream ps)
          This method prints stack trace of both Throwables that were given at construction time.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExceptionPairException

public ExceptionPairException()

ExceptionPairException

public ExceptionPairException(java.lang.Throwable e,
                              java.lang.Throwable e2)
This constructor builds ExceptionPairException from a pair of Throwables. Both are treated equally.

Parameters:
e - - one of the Throwables; can be null
e2 - - the other Throwable; can be null
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
This method prints stack trace of both Throwables that were given at construction time.

Overrides:
printStackTrace in class java.lang.Throwable