Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] included getURI() in ParsingException.toString()

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] included getURI() in ParsingException.toString()
  • Date: Thu, 16 Jun 2005 18:59:40 -0700

For XSLT and XQuery or other programs processing lots of files, debugging would be made much easier if the URI of the current document would be included in ParsingException.toString(), if available. That way it would be immediately obvious which file causes the parsing problem. Otherwise one would need to add extra instrumentation in all sorts of places.

Here is the simple patch for ParsingException:

public String toString() {
return super.toString() + " at line "
+ lineNumber + ", column " + columnNumber + ", uri " + uri + ".";
}

Wolfgang.




Archive powered by MHonArc 2.6.24.

Top of Page