Skip to content

Commit b5242e2

Browse files
committed
JSSAXParser better error reporting; catch Throwable
1 parent 49eaf30 commit b5242e2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sources/net.sf.j2s.java.core/src/swingjs/xml/JSSAXParser.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void parseXMLString(String data) throws SAXException, IOException {
9191
public void parseXMLString(String data, int mode) throws SAXException, IOException {
9292
try {
9393
parseDocument(parseXML(data), mode);
94-
} catch (Exception e) {
94+
} catch (Throwable e) {
9595
error(e);
9696
}
9797
}
@@ -150,7 +150,9 @@ private String removeProcessing(String data) {
150150
// uniqueSeq = s;
151151
// }
152152

153-
private void error(Exception e) throws SAXException {
153+
private void error(Throwable e) throws SAXException {
154+
System.err.println(e);
155+
e.printStackTrace();
154156
SAXParseException ee = new SAXParseException("Invalid Document", null);
155157
if (errorHandler == null)
156158
throw(ee);

0 commit comments

Comments
 (0)