From ee5cc3d419a166e1ad453961e86bc4857510c2da Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Sun, 19 Nov 2000 22:13:34 +0000 Subject: [PATCH] Change the message displayed when a task cannot be found. This makes the message more suitable for ant end-users rather than ant developers. Submitted by: Erik Meade git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268213 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/UnknownElement.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/org/apache/tools/ant/UnknownElement.java b/src/main/org/apache/tools/ant/UnknownElement.java index 1aa8c4b37..4ea66dca1 100644 --- a/src/main/org/apache/tools/ant/UnknownElement.java +++ b/src/main/org/apache/tools/ant/UnknownElement.java @@ -82,12 +82,14 @@ public class UnknownElement extends Task { public void maybeConfigure() throws BuildException { realTask = project.createTask(elementName); if (realTask == null) { - throw new BuildException("Could not create task of type: "+elementName+ - " because I can\'t find it in the list of task"+ - " class definitions. Common solutions are: 1"+ - " execute bin/bootstrap. 2 use taskdef to declare"+ - " your task. 3 add the task to defaults.properties." - , location); + log("Could not create task of type: " + elementName + " Common solutions" + + " are adding the task to defaults.properties and executing bin/bootstrap", + Project.MSG_DEBUG); + throw new BuildException("Could not create task of type: " + elementName + + ". Common solutions are to use taskdef to declare" + + " your task, or, if this is an optional task," + + " to put the optional.jar in the lib directory of" + + " your ant installation (ANT_HOME).", location); } realTask.setLocation(location);