mrglavas 2004/07/09 14:38:59
Modified: java/src/org/apache/xerces/parsers DOMParserImpl.java
Log:
If the exception thrown is an XMLParseException
we've already reported the error to the user's
error-handler. We were reporting fatal errors
twice. On the second time without an error type
set.
Revision Changes Path
1.27 +4 -3 xml-xerces/java/src/org/apache/xerces/parsers/DOMParserImpl.java
Index: DOMParserImpl.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/DOMParserImpl.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- DOMParserImpl.java 7 May 2004 21:35:35 -0000 1.26
+++ DOMParserImpl.java 9 Jul 2004 21:38:58 -0000 1.27
@@ -42,6 +42,7 @@
import org.apache.xerces.xni.parser.XMLEntityResolver;
import org.apache.xerces.xni.parser.XMLInputSource;
import org.apache.xerces.xni.parser.XMLParserConfiguration;
+import org.apache.xerces.xni.parser.XMLParseException;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -856,7 +857,7 @@
// Consume this exception if the user
// issued an interrupt or an abort.
if (e != abort) {
- if (fErrorHandler != null) {
+ if (!(e instanceof XMLParseException) && fErrorHandler != null) {
DOMErrorImpl error = new DOMErrorImpl ();
error.fException = e;
error.fMessage = e.getMessage ();
@@ -897,7 +898,7 @@
// Consume this exception if the user
// issued an interrupt or an abort.
if (e != abort) {
- if (fErrorHandler != null) {
+ if (!(e instanceof XMLParseException) && fErrorHandler != null) {
DOMErrorImpl error = new DOMErrorImpl ();
error.fException = e;
error.fMessage = e.getMessage ();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]