diff --git a/src/java/org/apache/commons/lang/exception/NestableDelegate.java b/src/java/org/apache/commons/lang/exception/NestableDelegate.java
index 6d7dfa215..bd46e2140 100644
--- a/src/java/org/apache/commons/lang/exception/NestableDelegate.java
+++ b/src/java/org/apache/commons/lang/exception/NestableDelegate.java
@@ -65,7 +65,7 @@
* @author Daniel Rall
* @author Kasper Nielsen
* @author Steven Caswell
- * @version $Id: NestableDelegate.java,v 1.7 2002/08/25 19:02:49 dlr Exp $
+ * @version $Id: NestableDelegate.java,v 1.8 2002/08/25 19:09:38 dlr Exp $
*/
public class NestableDelegate
{
@@ -77,23 +77,24 @@ public class NestableDelegate
+ "constructor must extend java.lang.Throwable";
/**
- * Holds the reference to the exception or error that caused this
- * exception to be thrown.
+ * Holds the reference to the exception or error that we're
+ * wrapping (which must be a {@link
+ * org.apache.commons.lang.exception.Nestable} implementation).
*/
- private Throwable cause = null;
+ private Throwable nestable = null;
/**
* Constructs a new NestableDelegate
instance to manage the
* specified Nestable
.
*
- * @param cause the Nestable implementation (must extend
+ * @param nestable the Nestable implementation (must extend
* {@link java.lang.Throwable})
*/
- NestableDelegate(Nestable cause) // package
+ NestableDelegate(Nestable nestable) // package
{
- if (cause instanceof Throwable)
+ if (nestable instanceof Throwable)
{
- this.cause = (Throwable) cause;
+ this.nestable = (Throwable) nestable;
}
else
{
@@ -146,7 +147,7 @@ String getMessage(String baseMsg) // package
msg.append(baseMsg);
}
- Throwable nestedCause = ExceptionUtils.getCause(this.cause);
+ Throwable nestedCause = ExceptionUtils.getCause(this.nestable);
if (nestedCause != null)
{
String causeMsg = nestedCause.getMessage();
@@ -201,7 +202,7 @@ Throwable getThrowable(int index)
{
if(index == 0)
{
- return this.cause;
+ return this.nestable;
}
Throwable[] throwables = this.getThrowables();
return throwables[index];
@@ -215,7 +216,7 @@ Throwable getThrowable(int index)
*/
int getThrowableCount() // package
{
- return ExceptionUtils.getThrowableCount(this.cause);
+ return ExceptionUtils.getThrowableCount(this.nestable);
}
/**
@@ -227,7 +228,7 @@ int getThrowableCount() // package
*/
Throwable[] getThrowables() // package
{
- return ExceptionUtils.getThrowables(this.cause);
+ return ExceptionUtils.getThrowables(this.nestable);
}
/**
@@ -247,7 +248,7 @@ Throwable[] getThrowables() // package
*/
int indexOfThrowable(Class type, int fromIndex) // package
{
- return ExceptionUtils.indexOfThrowable(this.cause, type, fromIndex);
+ return ExceptionUtils.indexOfThrowable(this.nestable, type, fromIndex);
}
/**
@@ -287,8 +288,8 @@ public void printStackTrace(PrintWriter out)
{
synchronized (out)
{
- String[] st = getStackFrames(this.cause);
- Throwable nestedCause = ExceptionUtils.getCause(this.cause);
+ String[] st = getStackFrames(this.nestable);
+ Throwable nestedCause = ExceptionUtils.getCause(this.nestable);
if (nestedCause != null)
{
if (nestedCause instanceof Nestable)