conor       2004/08/12 07:32:50

  Modified:    src/main/org/apache/tools/ant/launch Tag: ANT_16_BRANCH
                        Launcher.java
  Log:
  Print out some additional info when launcher receives an
  Instantiation Exception.
  
  PR:    30611
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.5.2.13  +7 -1      ant/src/main/org/apache/tools/ant/launch/Launcher.java
  
  Index: Launcher.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/launch/Launcher.java,v
  retrieving revision 1.5.2.12
  retrieving revision 1.5.2.13
  diff -u -w -u -r1.5.2.12 -r1.5.2.13
  --- Launcher.java     15 Mar 2004 18:03:56 -0000      1.5.2.12
  +++ Launcher.java     12 Aug 2004 14:32:50 -0000      1.5.2.13
  @@ -195,7 +195,13 @@
               AntMain main = (AntMain) mainClass.newInstance();
               main.startAnt(newArgs, null, null);
           } catch (Throwable t) {
  +            if (t instanceof InstantiationException) {
  +                InstantiationException ie = (InstantiationException) t;
  +                System.err.println("Instantiation Exception - root cause:");
  +                ie.getCause().printStackTrace();
  +            } else {
               t.printStackTrace();
  +            }
           }
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to