conor       02/01/06 20:11:38

  Modified:    src/main/org/apache/tools/ant Project.java
  Log:
  Additional debug messages to make it easier to diagnose why a task
  can't be instantiated.
  
  Revision  Changes    Path
  1.90      +5 -3      jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -w -u -r1.89 -r1.90
  --- Project.java      14 Dec 2001 11:15:42 -0000      1.89
  +++ Project.java      7 Jan 2002 04:11:38 -0000       1.90
  @@ -189,9 +189,9 @@
                       Class taskClass = Class.forName(value);
                       addTaskDefinition(key, taskClass);
                   } catch (NoClassDefFoundError ncdfe) {
  -                    // ignore...
  +                    log("Could not load a dependent class (" + 
ncdfe.getMessage() + ") for task " + key, MSG_DEBUG); 
                   } catch (ClassNotFoundException cnfe) {
  -                    // ignore...
  +                    log("Could not load class (" + value + ") for task " + 
key, MSG_DEBUG); 
                   }
               }
           } catch (IOException ioe) {
  @@ -739,8 +739,10 @@
       public Task createTask(String taskType) throws BuildException {
           Class c = (Class) taskClassDefinitions.get(taskType);
   
  -        if (c == null)
  +        if (c == null) {
               return null;
  +        }
  +        
           try {
               Object o = c.newInstance();
               Task task = null;
  
  
  

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

Reply via email to