conor       2003/06/10 07:05:58

  Modified:    src/main/org/apache/tools/ant ComponentHelper.java
               src/main/org/apache/tools/ant/taskdefs Definer.java
  Log:
  Improve error messages when creating tasks
  
  Revision  Changes    Path
  1.11      +4 -0      ant/src/main/org/apache/tools/ant/ComponentHelper.java
  
  Index: ComponentHelper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/ComponentHelper.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -w -u -r1.10 -r1.11
  --- ComponentHelper.java      28 May 2003 16:27:32 -0000      1.10
  +++ ComponentHelper.java      10 Jun 2003 14:05:58 -0000      1.11
  @@ -465,6 +465,10 @@
               String msg = "   +Task: " + taskType;
               project.log (msg, Project.MSG_DEBUG);
               return task;
  +        } catch (NoClassDefFoundError ncdfe) {
  +            String msg = "Task " + taskType + ": A class needed by class "
  +                + c + " cannot be found: " + ncdfe.getMessage();
  +            throw new BuildException(msg, ncdfe);
           } catch (Throwable t) {
               System.out.println("task CL=" + c.getClassLoader());
               String msg = "Could not create task of type: "
  
  
  
  1.30      +1 -1      ant/src/main/org/apache/tools/ant/taskdefs/Definer.java
  
  Index: Definer.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Definer.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -w -u -r1.29 -r1.30
  --- Definer.java      23 Apr 2003 15:03:06 -0000      1.29
  +++ Definer.java      10 Jun 2003 14:05:58 -0000      1.30
  @@ -250,7 +250,7 @@
                   + " cannot be found";
               throw new BuildException(msg, cnfe, getLocation());
           } catch (NoClassDefFoundError ncdfe) {
  -            String msg = getTaskName() + "A class needed on loading by class 
"
  +            String msg = getTaskName() + ": A class needed by class "
                   + value + " cannot be found: " + ncdfe.getMessage();
               throw new BuildException(msg, ncdfe, location);
           }
  
  
  

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

Reply via email to