Class RuntimeMultiException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.directory.api.util.exception.RuntimeMultiException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MessageException
,ResponseCarryingMessageException
public class RuntimeMultiException extends RuntimeException
This exception is thrown when Base class for nested exceptions.- Author:
- Apache Directory Project
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RuntimeMultiException()
Constructs an Exception without a message.RuntimeMultiException(String message)
Constructs an Exception with a detailed message.RuntimeMultiException(String message, Throwable t)
Constructs an Exception with a detailed message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addThrowable(Throwable nested)
Add an exeception to this multiexception.boolean
isEmpty()
Tests to see if exceptions are nested within this exception.Iterator<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(PrintStream out)
Beside printing out the standard stack trace this method prints out the stack traces of all the nested exceptions.void
printStackTrace(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 (number of) exceptions nested within this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
-
-
-
Constructor Detail
-
RuntimeMultiException
public RuntimeMultiException()
Constructs an Exception without a message.
-
RuntimeMultiException
public RuntimeMultiException(String message)
Constructs an Exception with a detailed message.- Parameters:
message
- The message associated with the exception.
-
RuntimeMultiException
public RuntimeMultiException(String message, Throwable t)
Constructs an Exception with a detailed message.- Parameters:
message
- The message associated with the exception.t
- The Throwable that causes the Exception
-
-
Method Detail
-
listNestedExceptions
public Iterator<Throwable> listNestedExceptions()
Lists the nested exceptions that this Exception encapsulates.- Returns:
- an Iterator over the nested exceptions.
-
size
public int size()
Gets the size (number of) exceptions nested within this exception.- Returns:
- the size of this nested exception.
-
isEmpty
public boolean isEmpty()
Tests to see if exceptions are nested within this exception.- Returns:
- true if an exception is nested, false otherwise
-
addThrowable
public void addThrowable(Throwable nested)
Add an exeception to this multiexception.- Parameters:
nested
- exception to add to this MultiException.
-
printStackTrace
public void printStackTrace(PrintWriter out)
Beside printing out the standard stack trace this method prints out the stack traces of all the nested exceptions.- Overrides:
printStackTrace
in classThrowable
- Parameters:
out
- PrintWriter to write the nested stack trace to.
-
printStackTrace
public void printStackTrace(PrintStream out)
Beside printing out the standard stack trace this method prints out the stack traces of all the nested exceptions.- Overrides:
printStackTrace
in classThrowable
- 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 classThrowable
-
-