diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2000-10-06 17:41:52 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2000-10-06 17:41:52 +0000 |
commit | 6de482aa33686cd1ce5f2f8a7d02236b9082972e (patch) | |
tree | 59dd109aea6072b147fe73aac92268fc4185efa5 /Lib/xml/sax/_exceptions.py | |
parent | 38985687f52e605ec6e008f967acc2f900eba914 (diff) | |
download | cpython-6de482aa33686cd1ce5f2f8a7d02236b9082972e.tar.gz |
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 c02974fb8e..1804f3fde2 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.""" |