_exceptions: Format a missing system id as <unknown>.
expatreader: Use the error handler instead of raising exception directly.
diff --git a/Lib/xml/sax/expatreader.py b/Lib/xml/sax/expatreader.py
index 14bc087..1414bb5 100644
--- a/Lib/xml/sax/expatreader.py
+++ b/Lib/xml/sax/expatreader.py
@@ -81,7 +81,8 @@
self._parser.Parse(data, isFinal)
except expat.error:
error_code = self._parser.ErrorCode
- raise SAXParseException(expat.ErrorString(error_code), None, self)
+ exc = SAXParseException(expat.ErrorString(error_code), None, self)
+ self._err_handler.fatalError(exc)
def close(self):
if self._entity_stack: