elharo / xom

XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with Java that strives for correctness, simplicity, and performance, in that order.
https://xom.nu
Other
62 stars 32 forks source link

XInlcudeDriver needs better error reporting #206

Closed elharo closed 1 year ago

elharo commented 1 year ago

Seen in output of website build is a raw stack dump that does not even include the line and URL where the problem occurred:

$ more /Users/elharo/xom/website/./build/finished_tutorial.xml
java.net.UnknownHostException: file
java.net.UnknownHostException: file
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
        at java.net.Socket.connect(Socket.java:607)
        at sun.net.ftp.impl.FtpClient.doConnect(FtpClient.java:1062)
        at sun.net.ftp.impl.FtpClient.tryConnect(FtpClient.java:1024)
        at sun.net.ftp.impl.FtpClient.connect(FtpClient.java:1119)
        at sun.net.ftp.impl.FtpClient.connect(FtpClient.java:1105)
        at sun.net.www.protocol.ftp.FtpURLConnection.connect(FtpURLConnection.java:311)
        at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:417)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:624)
        at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:148)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:805)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:642)
        at nu.xom.Builder.build(Unknown Source)
        at nu.xom.Builder.build(Unknown Source)
        at nu.xom.samples.XIncludeDriver.main(Unknown Source)