diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2000-10-09 16:45:54 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2000-10-09 16:45:54 (GMT) |
commit | 04f4943d132d0d5e9829923706a2cb07a2b0ae9f (patch) | |
tree | 26f51d8e66bb89d40b277ebf017c8ddfdcd778f8 /Lib/xml/sax/expatreader.py | |
parent | 3383792c74ad6cb8b71bf54985cd54582657561e (diff) | |
download | cpython-04f4943d132d0d5e9829923706a2cb07a2b0ae9f.zip cpython-04f4943d132d0d5e9829923706a2cb07a2b0ae9f.tar.gz cpython-04f4943d132d0d5e9829923706a2cb07a2b0ae9f.tar.bz2 |
_exceptions: Format a missing system id as <unknown>.
expatreader: Use the error handler instead of raising exception directly.
Diffstat (limited to 'Lib/xml/sax/expatreader.py')
-rw-r--r-- | Lib/xml/sax/expatreader.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator): 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: |