You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2001/11/05 20:48:21 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/readers DefaultEntityHandler.java
neilg 01/11/05 11:48:21
Modified: java/src/org/apache/xerces/readers Tag: xerces_j_1
DefaultEntityHandler.java
Log:
throw an IOException when a file cannot be located instead of a SAXException. This mirrors the behaviour of Xerces2 and complies with what JAXP expects a parser to do.
Revision Changes Path
No revision
No revision
1.8.2.2 +6 -3 xml-xerces/java/src/org/apache/xerces/readers/Attic/DefaultEntityHandler.java
Index: DefaultEntityHandler.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/readers/Attic/DefaultEntityHandler.java,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -r1.8.2.1 -r1.8.2.2
--- DefaultEntityHandler.java 2001/11/05 13:10:19 1.8.2.1
+++ DefaultEntityHandler.java 2001/11/05 19:48:21 1.8.2.2
@@ -79,7 +79,7 @@
/**
* Default entity handler implementation.
*
- * @version $Id: DefaultEntityHandler.java,v 1.8.2.1 2001/11/05 13:10:19 elena Exp $
+ * @version $Id: DefaultEntityHandler.java,v 1.8.2.2 2001/11/05 19:48:21 neilg Exp $
*/
public class DefaultEntityHandler
implements XMLEntityHandler, XMLEntityHandler.DTDHandler {
@@ -504,7 +504,9 @@
0,
args,
XMLErrorReporter.ERRORTYPE_FATAL_ERROR);
- } catch (FileNotFoundException fnf) {
+ } catch (FileNotFoundException fnf) {
+ // according to the JAXP spec, SAXExceptions should not be
+ // generated in this case! - neilg
String errorSystemId = fSystemId;
fEventHandler.endEntityReference(fEntityName, fEntityType, fEntityContext);
popReader();
@@ -516,7 +518,8 @@
ImplementationMessages.IO0,
0,
args,
- XMLErrorReporter.ERRORTYPE_FATAL_ERROR);
+ XMLErrorReporter.ERRORTYPE_RECOVERABLE_ERROR);
+ throw fnf;
} catch (UnsupportedEncodingException uee) {
fEventHandler.endEntityReference(fEntityName, fEntityType, fEntityContext);
popReader();
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org