Looks ok to me, SAXEventGenerator is used by IndexManager too but it doesn' t bother with the return value anyway.
Thanks
On Thursday, February 21, 2002, at 07:10 AM, Mike Gratton wrote:
Guys,
When calling getContentAsSAX(), any exceptions thrown by the ContentHandler passed to that method are silently dropped by SAXEventGenerator. This causes no end of frustration trying to track down errors when processing XML content using SAX.
The problem with SAXEventGenerator the start() method. It catches all exceptions and simply returns false if an exception is thrown.
Can I propose removing start() then renaming processDocument() to start(), as per the attached patch? This means any SAXExceptions thrown will at least cause a XMLDBException to be thrown, and make debugging much easier.
If there's no objections, can someone check the patch in for me?
Cheers, Mike.
-- Mike Gratton <[EMAIL PROTECTED]>
"Every motive escalate."
Blatant self-promotion: <http://web.vee.net/>
Index: java/src/org/apache/xindice/xml/sax/SAXEventGenerator.java
===================================================================
RCS file: /home/cvspublic/xml-xindice/java/src/org/apache/xindice/xml/sax/
SAXEventGenerator.java,v
retrieving revision 1.3
diff -u -r1.3 SAXEventGenerator.java
--- java/src/org/apache/xindice/xml/sax/SAXEventGenerator.java 6 Jan 2002 18:10:17 -0000 1.3
+++ java/src/org/apache/xindice/xml/sax/SAXEventGenerator.java 21 Feb 2002 14:11:31 -0000
@@ -302,7 +302,7 @@
return !interrupt;
}
- public boolean processDocument() throws IOException, SAXException { + public boolean start() throws IOException, SAXException { if ( comp != null ) { comp.symbols(symbols); comp.dataBytes(data); @@ -312,16 +312,6 @@ if ( result ) content.endDocument(); return result; - } - - public boolean start() { - try { - return processDocument(); - } - catch ( Exception e ) { - org.apache.xindice.Debug.printStackTrace(e); - return false; - } }
public void stop() {
Kimbro Staken - http://www.kstaken.org - http://www.xmldatabases.org Apache Xindice native XML database http://xml.apache.org XML:DB Initiative http://www.xmldb.org Senior Technologist (Your company name here)
