Browse Source

A couple extra traces in the log for xml validate.

I wonder if we should include the full exception text on a parse failure, as it is often useful.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276741 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 21 years ago
parent
commit
c876b58d28
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java

+ 2
- 1
src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java View File

@@ -391,7 +391,7 @@ public class XMLValidateTask extends Task {
*/
private void setFeature(String feature, boolean value)
throws BuildException {
log("Setting feature "+feature+"="+value,Project.MSG_DEBUG);
try {
xmlReader.setFeature(feature, value);
} catch (SAXNotRecognizedException e) {
@@ -459,6 +459,7 @@ public class XMLValidateTask extends Task {
is.setSystemId(uri);
xmlReader.parse(is);
} catch (SAXException ex) {
log("Caught when validating: "+ex.toString(),Project.MSG_DEBUG);
if (failOnError) {
throw new BuildException(
"Could not validate document " + afile);


Loading…
Cancel
Save