org.apache.commons.lang.exception

Class NestableRuntimeException

public class NestableRuntimeException extends RuntimeException implements Nestable

The base class of all runtime exceptions which can contain other exceptions.

Since: 1.0

Version: $Id: NestableRuntimeException.java 161243 2005-04-14 04:30:28Z ggregory $

Author: Rafal Krzewski Daniel Rall Kasper Nielsen Steven Caswell

See Also: NestableException

Field Summary
protected NestableDelegatedelegate
The helper instance which contains much of the code which we delegate to.
Constructor Summary
NestableRuntimeException()
Constructs a new NestableRuntimeException without specified detail message.
NestableRuntimeException(String msg)
Constructs a new NestableRuntimeException with specified detail message.
NestableRuntimeException(Throwable cause)
Constructs a new NestableRuntimeException with specified nested Throwable.
NestableRuntimeException(String msg, Throwable cause)
Constructs a new NestableRuntimeException with specified detail message and nested Throwable.
Method Summary
ThrowablegetCause()
StringgetMessage()
Returns the detail message string of this throwable.
StringgetMessage(int index)
String[]getMessages()
ThrowablegetThrowable(int index)
intgetThrowableCount()
Throwable[]getThrowables()
intindexOfThrowable(Class type)
intindexOfThrowable(Class type, int fromIndex)
voidprintPartialStackTrace(PrintWriter out)
voidprintStackTrace()
voidprintStackTrace(PrintStream out)
voidprintStackTrace(PrintWriter out)

Field Detail

delegate

protected NestableDelegate delegate
The helper instance which contains much of the code which we delegate to.

Constructor Detail

NestableRuntimeException

public NestableRuntimeException()
Constructs a new NestableRuntimeException without specified detail message.

NestableRuntimeException

public NestableRuntimeException(String msg)
Constructs a new NestableRuntimeException with specified detail message.

Parameters: msg the error message

NestableRuntimeException

public NestableRuntimeException(Throwable cause)
Constructs a new NestableRuntimeException with specified nested Throwable.

Parameters: cause the exception or error that caused this exception to be thrown

NestableRuntimeException

public NestableRuntimeException(String msg, Throwable cause)
Constructs a new NestableRuntimeException with specified detail message and nested Throwable.

Parameters: msg the error message cause the exception or error that caused this exception to be thrown

Method Detail

getCause

public Throwable getCause()

getMessage

public String getMessage()
Returns the detail message string of this throwable. If it was created with a null message, returns the following: (cause==null ? null : cause.toString()).

Returns: String message string of the throwable

getMessage

public String getMessage(int index)

getMessages

public String[] getMessages()

getThrowable

public Throwable getThrowable(int index)

getThrowableCount

public int getThrowableCount()

getThrowables

public Throwable[] getThrowables()

indexOfThrowable

public int indexOfThrowable(Class type)

indexOfThrowable

public int indexOfThrowable(Class type, int fromIndex)

printPartialStackTrace

public final void printPartialStackTrace(PrintWriter out)

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(PrintStream out)

printStackTrace

public void printStackTrace(PrintWriter out)
Copyright © 2001-2005 - Apache Software Foundation