sboag 99/12/12 23:55:25
Modified: src/org/apache/xalan/xpath XPathException.java
Log:
If will crash because of dumb SAX bug, just print out a message to that
effect.
Revision Changes Path
1.4 +14 -3 xml-xalan/src/org/apache/xalan/xpath/XPathException.java
Index: XPathException.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/XPathException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XPathException.java 1999/11/28 04:25:08 1.3
+++ XPathException.java 1999/12/13 07:55:24 1.4
@@ -97,7 +97,7 @@
}
catch(Exception e){}
Exception exception = m_exception;
- while(null != exception)
+ for(int i = 0; (i < 10) && (null != exception); i++)
{
s.println("---------");
exception.printStackTrace(s);
@@ -154,17 +154,28 @@
}
catch(Exception e){}
Exception exception = m_exception;
- while(null != exception)
+
+ for(int i = 0; (i < 10) && (null != exception); i++)
{
s.println("---------");
- exception.printStackTrace(s);
+ try
+ {
+ exception.printStackTrace(s);
+ }
+ catch(Exception e)
+ {
+ s.println("Could not print stack trace...");
+ }
if(exception instanceof SAXException)
{
SAXException se = (SAXException)exception;
Exception prev = exception;
exception = se.getException();
if(prev == exception)
+ {
+ exception = null;
break;
+ }
}
else
{