--- src/main/org/apache/tools/ant/taskdefs/MacroInstance.java 2004-01-28 17:39:58.000000000 -0600 +++ src/main/org/apache/tools/ant/taskdefs/MacroInstance.java 2004-01-28 17:00:20.000000000 -0600 @@ -298,9 +298,13 @@ Element element = (Element) presentElements.get(tag); if (element == null) { if (!templateElement.isOptional()) { - throw new BuildException( - "Required nested element " - + templateElement.getName() + " missing"); + String msg = "Required nested element " + + templateElement.getName() + " missing"; + if (templateElement.getDescription() != null) { + msg+= "; description=\"" + + templateElement.getDescription() + "\""; + } + throw new BuildException(msg); } continue; } @@ -332,8 +336,12 @@ value = macroSubs(value, localProperties); } if (value == null) { - throw new BuildException( - "required attribute " + attribute.getName() + " not set"); + String msg = "Required attribute " + + attribute.getName() + " not set"; + if (attribute.getDescription() != null) { + msg+= "; description=\"" + attribute.getDescription() + "\""; + } + throw new BuildException(msg); } localProperties.put(attribute.getName(), value); copyKeys.remove(attribute.getName());