mrglavas 2005/06/20 12:19:55
Modified: java/src/org/apache/xerces/util ErrorHandlerProxy.java
Log:
Fixing a bug. It was possible that the error handler would report the same
error twice.
Revision Changes Path
1.2 +12 -6
xml-xerces/java/src/org/apache/xerces/util/ErrorHandlerProxy.java
Index: ErrorHandlerProxy.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/util/ErrorHandlerProxy.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ErrorHandlerProxy.java 20 Jun 2005 18:36:05 -0000 1.1
+++ ErrorHandlerProxy.java 20 Jun 2005 19:19:55 -0000 1.2
@@ -41,28 +41,34 @@
public void error(SAXParseException e) throws SAXException {
XMLErrorHandler eh = getErrorHandler();
- if(eh instanceof ErrorHandlerWrapper) {
+ if (eh instanceof ErrorHandlerWrapper) {
((ErrorHandlerWrapper)eh).fErrorHandler.error(e);
}
- eh.error("","",ErrorHandlerWrapper.createXMLParseException(e));
+ else {
+ eh.error("","",ErrorHandlerWrapper.createXMLParseException(e));
+ }
// if an XNIException is thrown, just let it go.
// REVISIT: is this OK? or should we try to wrap it into
SAXException?
}
public void fatalError(SAXParseException e) throws SAXException {
XMLErrorHandler eh = getErrorHandler();
- if(eh instanceof ErrorHandlerWrapper) {
+ if (eh instanceof ErrorHandlerWrapper) {
((ErrorHandlerWrapper)eh).fErrorHandler.fatalError(e);
}
- eh.fatalError("","",ErrorHandlerWrapper.createXMLParseException(e));
+ else {
+
eh.fatalError("","",ErrorHandlerWrapper.createXMLParseException(e));
+ }
}
public void warning(SAXParseException e) throws SAXException {
XMLErrorHandler eh = getErrorHandler();
- if(eh instanceof ErrorHandlerWrapper) {
+ if (eh instanceof ErrorHandlerWrapper) {
((ErrorHandlerWrapper)eh).fErrorHandler.warning(e);
}
- eh.warning("","",ErrorHandlerWrapper.createXMLParseException(e));
+ else {
+ eh.warning("","",ErrorHandlerWrapper.createXMLParseException(e));
+ }
}
protected abstract XMLErrorHandler getErrorHandler();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]