net.sf.japaki.basic
Class MultiCauseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.sf.japaki.basic.MultiCauseException
All Implemented Interfaces:
Serializable

public class MultiCauseException
extends RuntimeException

An exception with more than one cause.

See Also:
Serialized Form

Constructor Summary
MultiCauseException()
          Constructs a new exception without detail message.
MultiCauseException(String s)
          Constructs a new exception with the specified detail message.
MultiCauseException(String message, List<Throwable> causes)
          Constructs a new exception with the specified detail message and causes.
 
Method Summary
 void add(Throwable cause)
          Appends the specified cause to the list of causes.
 List<Throwable> getCauses()
          Returns the causes of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiCauseException

public MultiCauseException()
Constructs a new exception without detail message.


MultiCauseException

public MultiCauseException(String s)
Constructs a new exception with the specified detail message. See Throwable for details.


MultiCauseException

public MultiCauseException(String message,
                           List<Throwable> causes)
Constructs a new exception with the specified detail message and causes.

Parameters:
message - the detail message
causes - the causes of this exception
Method Detail

getCauses

public List<Throwable> getCauses()
Returns the causes of this exception.

Returns:
the causes of this exception
See Also:
Throwable.getCause()

add

public void add(Throwable cause)
Appends the specified cause to the list of causes.

Parameters:
cause - a new cause