org.apache.commons.lang.exception

Class NestableError

public class NestableError extends Error implements Nestable

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

Since: 1.0

Version: $Id: NestableError.java 512889 2007-02-28 18:18:20Z dlr $

Author: Daniel L. Rall

See Also: NestableException

Field Summary
protected NestableDelegatedelegate
The helper instance which contains much of the code which we delegate to.
Constructor Summary
NestableError()
Constructs a new NestableError without specified detail message.
NestableError(String msg)
Constructs a new NestableError with specified detail message.
NestableError(Throwable cause)
Constructs a new NestableError with specified nested Throwable.
NestableError(String msg, Throwable cause)
Constructs a new NestableError 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

NestableError

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

NestableError

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

Parameters: msg The error message.

NestableError

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

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

NestableError

public NestableError(String msg, Throwable cause)
Constructs a new NestableError 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()
{@inheritDoc }

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)
{@inheritDoc }

getMessages

public String[] getMessages()
{@inheritDoc }

getThrowable

public Throwable getThrowable(int index)
{@inheritDoc }

getThrowableCount

public int getThrowableCount()
{@inheritDoc }

getThrowables

public Throwable[] getThrowables()
{@inheritDoc }

indexOfThrowable

public int indexOfThrowable(Class type)
{@inheritDoc }

indexOfThrowable

public int indexOfThrowable(Class type, int fromIndex)
{@inheritDoc }

printPartialStackTrace

public final void printPartialStackTrace(PrintWriter out)
{@inheritDoc }

printStackTrace

public void printStackTrace()
{@inheritDoc }

printStackTrace

public void printStackTrace(PrintStream out)
{@inheritDoc }

printStackTrace

public void printStackTrace(PrintWriter out)
{@inheritDoc }
Copyright © 2001-2011 - Apache Software Foundation