@@ -1259,25 +1259,25 @@ <h4 id="reraisingcaughtexception">Re-raising caught exception:</h4>
1259
1259
</ code > </ pre >
1260
1260
< h3 id ="commonbuiltinexceptions "> Common Built-in Exceptions</ h3 >
1261
1261
< pre > < code class ="python language-python hljs "> BaseException
1262
- +-- SystemExit < span class ="hljs-comment "> # Raised by the sys.exit() function.</ span >
1263
- +-- KeyboardInterrupt < span class ="hljs-comment "> # Raised when the user hits the interrupt key.</ span >
1264
- +-- Exception < span class ="hljs-comment "> # User-defined exceptions should be derived from this class.</ span >
1265
- +-- StopIteration < span class ="hljs-comment "> # Raised by next() when run on an empty iterator.</ span >
1266
- +-- ArithmeticError < span class ="hljs-comment "> # Base class for arithmetic errors.</ span >
1267
- | +-- ZeroDivisionError < span class ="hljs-comment "> # Raised when dividing by zero.</ span >
1268
- +-- AttributeError < span class ="hljs-comment "> # Raised when an attribute is missing.</ span >
1269
- +-- EOFError < span class ="hljs-comment "> # Raised by input() when it hits end-of-file condition.</ span >
1270
- +-- LookupError < span class ="hljs-comment "> # Raised when a look-up on sequence or dict fails.</ span >
1271
- | +-- IndexError < span class ="hljs-comment "> # Raised when a sequence index is out of range.</ span >
1272
- | +-- KeyError < span class ="hljs-comment "> # Raised when a dictionary key is not found.</ span >
1273
- +-- NameError < span class ="hljs-comment "> # Raised when a variable name is not found.</ span >
1274
- +-- OSError < span class ="hljs-comment "> # Failures such as “file not found” or “disk full”.</ span >
1275
- | +-- FileNotFoundError < span class ="hljs-comment "> # When a file or directory is requested but doesn't exist.</ span >
1276
- +-- RuntimeError < span class ="hljs-comment "> # Raised by errors that don't fall in other categories.</ span >
1277
- | +-- RecursionError < span class ="hljs-comment "> # Raised when the the maximum recursion depth is exceeded.</ span >
1278
- +-- TypeError < span class ="hljs-comment "> # Raised when an argument is of wrong type.</ span >
1279
- +-- ValueError < span class ="hljs-comment "> # When an argument is of right type but inappropriate value.</ span >
1280
- +-- UnicodeError < span class ="hljs-comment "> # Raised when encoding/decoding strings from/to bytes fails. </ span >
1262
+ ├── SystemExit < span class ="hljs-comment "> # Raised by the sys.exit() function.</ span >
1263
+ ├── KeyboardInterrupt < span class ="hljs-comment "> # Raised when the user hits the interrupt key.</ span >
1264
+ └── Exception < span class ="hljs-comment "> # User-defined exceptions should be derived from this class.</ span >
1265
+ ├── StopIteration < span class ="hljs-comment "> # Raised by next() when run on an empty iterator.</ span >
1266
+ ├── ArithmeticError < span class ="hljs-comment "> # Base class for arithmetic errors.</ span >
1267
+ │ └── ZeroDivisionError < span class ="hljs-comment "> # Raised when dividing by zero.</ span >
1268
+ ├── AttributeError < span class ="hljs-comment "> # Raised when an attribute is missing.</ span >
1269
+ ├── EOFError < span class ="hljs-comment "> # Raised by input() when it hits end-of-file condition.</ span >
1270
+ ├── LookupError < span class ="hljs-comment "> # Raised when a look-up on sequence or dict fails.</ span >
1271
+ │ ├── IndexError < span class ="hljs-comment "> # Raised when a sequence index is out of range.</ span >
1272
+ │ └── KeyError < span class ="hljs-comment "> # Raised when a dictionary key is not found.</ span >
1273
+ ├── NameError < span class ="hljs-comment "> # Raised when a variable name is not found.</ span >
1274
+ ├── OSError < span class ="hljs-comment "> # Failures such as “file not found” or “disk full”.</ span >
1275
+ │ └── FileNotFoundError < span class ="hljs-comment "> # When a file or directory is requested but doesn't exist.</ span >
1276
+ ├── RuntimeError < span class ="hljs-comment "> # Raised by errors that don't fall in other categories.</ span >
1277
+ │ └── RecursionError < span class ="hljs-comment "> # Raised when the the maximum recursion depth is exceeded.</ span >
1278
+ ├── TypeError < span class ="hljs-comment "> # Raised when an argument is of wrong type.</ span >
1279
+ └── ValueError < span class ="hljs-comment "> # When an argument is of right type but inappropriate value.</ span >
1280
+ └── UnicodeError < span class ="hljs-comment "> # Raised when encoding/decoding strings from/to bytes fails.</ span >
1281
1281
</ code > </ pre >
1282
1282
< h3 id ="userdefinedexceptions "> User-defined Exceptions</ h3 >
1283
1283
< pre > < code class ="python language-python hljs "> < span class ="hljs-class "> < span class ="hljs-keyword "> class</ span > < span class ="hljs-title "> MyError</ span > < span class ="hljs-params "> (Exception)</ span > :</ span >
0 commit comments