From 66c400defd2ed0bd492715a7f4f10e2545cf9d46 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Thu, 11 Jul 2002 02:00:26 +0000 Subject: [PATCH] Add jdk1.4 friendly getCause() method git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273086 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/BuildException.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/org/apache/tools/ant/BuildException.java b/src/main/org/apache/tools/ant/BuildException.java index 589c52502..ca7902fb5 100644 --- a/src/main/org/apache/tools/ant/BuildException.java +++ b/src/main/org/apache/tools/ant/BuildException.java @@ -165,6 +165,16 @@ public class BuildException extends RuntimeException { return cause; } + /** + * Returns the nested exception, if any. + * + * @return the nested exception, or null if no + * exception is associated with this one + */ + public Throwable getCause() { + return getException(); + } + /** * Returns the location of the error and the error message. *