Index: src/main/org/apache/tools/ant/Main.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v
retrieving revision 1.21
diff -u -r1.21 Main.java
--- src/main/org/apache/tools/ant/Main.java	2000/09/24 09:00:07	1.21
+++ src/main/org/apache/tools/ant/Main.java	2000/10/14 18:21:17
@@ -130,6 +135,11 @@
             new Main(args).runBuild();
             System.exit(0);
         }
+        catch(BuildException exc) {
+            // BuildException already handled by DefaultLogger,
+            // don't print them again
+            System.exit(1);
+        }
         catch(Throwable exc) {
             String message = exc.getMessage();
             if (message != null) {
@@ -312,9 +325,9 @@
      * @param suffix    Suffix filename to look for in parents.
      * @return          A handle to the build file
      *
-     * @exception BuildException    Failed to locate a build file
+     * @exception RuntimeException    Failed to locate a build file
      */
-    private File findBuildFile(String suffix) throws BuildException {
+    private File findBuildFile(String suffix) throws RuntimeException {
         if (msgOutputLevel >= Project.MSG_INFO) {
             System.out.println("Searching for " + suffix + " ...");
         }
@@ -330,7 +343,7 @@
             // if parent is null, then we are at the root of the fs,
             // complain that we can't find the build file.
             if (parent == null) {
-                throw new BuildException("Could not locate a build file!");
+                throw new RuntimeException("Could not locate a build file!");
             }
             
             // refresh our file handle
