diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2000-10-06 17:41:52 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2000-10-06 17:41:52 (GMT) |
commit | 962c9e7f9188c75a3889fcc7fd29fb1626e278d0 (patch) | |
tree | 3656fb89cdb496f4015152b35951276f432df3c7 /Lib/xml/sax/_exceptions.py | |
parent | 75698a4937130b0ca8019c553a4be7f02eb5ab0a (diff) | |
download | cpython-962c9e7f9188c75a3889fcc7fd29fb1626e278d0.zip cpython-962c9e7f9188c75a3889fcc7fd29fb1626e278d0.tar.gz cpython-962c9e7f9188c75a3889fcc7fd29fb1626e278d0.tar.bz2 |
Add SAXReaderNotAvailable, and use it to distinguish between an
ImportError, and a missing driver.
Diffstat (limited to 'Lib/xml/sax/_exceptions.py')
-rw-r--r-- | Lib/xml/sax/_exceptions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/xml/sax/_exceptions.py b/Lib/xml/sax/_exceptions.py index c02974f..1804f3f 100644 --- a/Lib/xml/sax/_exceptions.py +++ b/Lib/xml/sax/_exceptions.py @@ -104,3 +104,13 @@ class SAXNotSupportedException(SAXException): perform is requested (specifically setting a state or value). SAX applications and extensions may use this class for similar purposes.""" + +# ===== SAXNOTSUPPORTEDEXCEPTION ===== + +class SAXReaderNotAvailable(SAXNotSupportedException): + """Exception class for a missing driver. + + An XMLReader module (driver) should raise this exception when it + is first imported, e.g. when a support module cannot be imported. + It also may be raised during parsing, e.g. if executing an external + program is not permitted.""" |