org.apache.directory.shared.ldap
Class MultiException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.directory.shared.ldap.MultiException
All Implemented Interfaces:
java.io.Serializable

public class MultiException
extends java.lang.Exception

This exception is thrown when Base class for nested exceptions.

Version:
$Revision: 664290 $
Author:
Apache Directory Project
See Also:
Serialized Form

Constructor Summary
MultiException()
          Constructs an Exception without a message.
MultiException(java.lang.String message)
          Constructs an Exception with a detailed message.
 
Method Summary
 void addThrowable(java.lang.Throwable nested)
          Add an exeception to this multiexception.
 boolean isEmpty()
          Tests to see if there are any nested exceptions within this MultiException.
 java.util.Iterator<java.lang.Throwable> listNestedExceptions()
          Lists the nested exceptions that this Exception encapsulates.
 void printStackTrace()
          Beside printing out the standard stack trace this method prints out the stack traces of all the nested exceptions using standard error.
 void printStackTrace(java.io.PrintStream out)
          Beside printing out the standard stack trace this method prints out the stack traces of all the nested exceptions.
 void printStackTrace(java.io.PrintWriter out)
          Beside printing out the standard stack trace this method prints out the stack traces of all the nested exceptions.
 int size()
          Gets the size of this nested exception which equals the number of exception nested within.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiException

public MultiException()
Constructs an Exception without a message.


MultiException

public MultiException(java.lang.String message)
Constructs an Exception with a detailed message.

Parameters:
message - The message associated with the exception.
Method Detail

listNestedExceptions

public java.util.Iterator<java.lang.Throwable> listNestedExceptions()
Lists the nested exceptions that this Exception encapsulates.

Returns:
an Iterator over the nested exceptions.

size

public int size()
Gets the size of this nested exception which equals the number of exception nested within.

Returns:
the size of this nested exception.

isEmpty

public boolean isEmpty()
Tests to see if there are any nested exceptions within this MultiException.

Returns:
true if no exceptions are nested, false otherwise.

addThrowable

public void addThrowable(java.lang.Throwable nested)
Add an exeception to this multiexception.

Parameters:
nested - exception to add to this MultiException.

printStackTrace

public void printStackTrace(java.io.PrintWriter out)
Beside printing out the standard stack trace this method prints out the stack traces of all the nested exceptions.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
out - PrintWriter to write the nested stack trace to.

printStackTrace

public void printStackTrace(java.io.PrintStream out)
Beside printing out the standard stack trace this method prints out the stack traces of all the nested exceptions.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
out - PrintStream to write the nested stack trace to.

printStackTrace

public void printStackTrace()
Beside printing out the standard stack trace this method prints out the stack traces of all the nested exceptions using standard error.

Overrides:
printStackTrace in class java.lang.Throwable


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.