Browse Source

Additional debug messages to make it easier to diagnose why a task

can't be instantiated.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270603 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 23 years ago
parent
commit
78602edfb7
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/main/org/apache/tools/ant/Project.java

+ 5
- 3
src/main/org/apache/tools/ant/Project.java View File

@@ -189,9 +189,9 @@ public class Project {
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 class Project {
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;


Loading…
Cancel
Save