bodewig 2004/10/26 07:56:55 Modified: . CONTRIBUTORS src/main/org/apache/tools/ant/helper ProjectHelper2.java Log: Better error reporting when users set the wrong default namespace. PR: 30660 Submitted by: Kevin Greiner <kgreiner at xpediantsolutions dot com> Revision Changes Path 1.35 +1 -0 ant/CONTRIBUTORS Index: CONTRIBUTORS =================================================================== RCS file: /home/cvs/ant/CONTRIBUTORS,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- CONTRIBUTORS 20 Oct 2004 08:38:04 -0000 1.34 +++ CONTRIBUTORS 26 Oct 2004 14:56:55 -0000 1.35 @@ -104,6 +104,7 @@ Juerg Wanner Keiron Liddle Keith Visco +Kevin Greiner Kevin Ross Kevin Z Grey Kirk Wylie 1.49 +11 -1 ant/src/main/org/apache/tools/ant/helper/ProjectHelper2.java Index: ProjectHelper2.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/helper/ProjectHelper2.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- ProjectHelper2.java 30 Sep 2004 17:05:38 -0000 1.48 +++ ProjectHelper2.java 26 Oct 2004 14:56:55 -0000 1.49 @@ -220,6 +220,8 @@ be.setLocation(location); } throw be; + } else if (t == null) { + t = exc; } throw new BuildException(exc.getMessage(), t, location); @@ -227,6 +229,8 @@ Throwable t = exc.getException(); if (t instanceof BuildException) { throw (BuildException) t; + } else if (t == null) { + t = exc; } throw new BuildException(exc.getMessage(), t); } catch (FileNotFoundException exc) { @@ -552,8 +556,14 @@ // if (qname.equals( "target" ) ) // return ProjectHelper2.targetHandler; // } - throw new SAXParseException("Unexpected element \"" + qname + if (name.equals(qname)) { + throw new SAXParseException("Unexpected element \"{" + uri + + "}" + name + "\" {" + ANT_CORE_URI + "}" + name, + context.getLocator()); + } else { + throw new SAXParseException("Unexpected element \"" + qname + "\" " + name, context.getLocator()); + } } } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]