Revision: 232
http://xmlunit.svn.sourceforge.net/xmlunit/?rev=232&view=rev
Author: bodewig
Date: 2007-10-22 01:12:58 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
Improve error message on validation errors
Modified Paths:
--------------
trunk/xmlunit/src/java/org/custommonkey/xmlunit/Validator.java
Modified: trunk/xmlunit/src/java/org/custommonkey/xmlunit/Validator.java
===================================================================
--- trunk/xmlunit/src/java/org/custommonkey/xmlunit/Validator.java 2007-08-28 10:51:17 UTC (rev 231)
+++ trunk/xmlunit/src/java/org/custommonkey/xmlunit/Validator.java 2007-10-22 08:12:58 UTC (rev 232)
@@ -476,8 +476,11 @@
/**
* Deal with exceptions passed to the ErrorHandler interface by the parser.
*/
- private void errorHandlerException(Exception e) {
- invalidate(e.getMessage());
+ private void errorHandlerException(SAXParseException e) {
+ String msg = "At line " + e.getLineNumber() + ", column: "
+ + e.getColumnNumber() + " ==> " + e.getMessage();
+ if (!msg.endsWith("\n")) msg += "\n";
+ invalidate(msg);
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|