summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bodewig <bodewig@apache.org>2000-10-18 08:44:35 +0000
committerStefan Bodewig <bodewig@apache.org>2000-10-18 08:44:35 +0000
commitb0027003f4e1d45a463870aebf41c6b9dc064257 (patch)
treecb64bd020ab9ef5d4ce62cc1ba184b4a4c41ee6e
parentafd1f285dffc8ef179b7ee2f372860d5bff5f10f (diff)
downloadant-b0027003f4e1d45a463870aebf41c6b9dc064257.tar.gz
Don't print stack traces on compilation errors.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268102 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--WHATSNEW8
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/Javac.java4
2 files changed, 9 insertions, 3 deletions
diff --git a/WHATSNEW b/WHATSNEW
index 1e25ba617..64909d3fa 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -62,14 +62,14 @@ native2ascii, copy, move, mparse.
* copydir, copyfile, deltree and rename are now deprecated. They
should be replaced with the new copy, delete and move tasks.
-* <java> uses ClassLoader of its own in no-fork mode if a classpath is
+* <java> uses a ClassLoader of its own in no-fork mode if a classpath is
specified.
* <style> will create the necessary target directories and reprocess
all files if the stylesheet changes.
* New data types fileset and patternset - expected to get a broader use.
-They as well as PATH like structures can now be defined on a global
+They, as well as PATH like structures, can now be defined on a global
level and later be referenced by their id attribute.
* You can specify environment variables to <exec>.
@@ -114,4 +114,6 @@ cases.
* Nested <src> in <javac> caused NullPointerException.
-* Corrupt Zip- and Jar-files ar now deleted if the task fails. \ No newline at end of file
+* Corrupt Zip- and Jar-files ar now deleted if the task fails.
+
+* many more fixes we've forgotten to document here ...
diff --git a/src/main/org/apache/tools/ant/taskdefs/Javac.java b/src/main/org/apache/tools/ant/taskdefs/Javac.java
index e17f563c5..ff9875d5e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Javac.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java
@@ -521,7 +521,11 @@ public class Javac extends MatchingTask {
throw new BuildException(FAIL_MSG, location);
}
} catch (Exception ex) {
+ if (ex instanceof BuildException) {
+ throw (BuildException) ex;
+ } else {
throw new BuildException("Error starting modern compiler", ex, location);
+ }
}
}