Exception Handling | Explanation |
---|---|
Exception | General Error base class |
BaseException | Base class for all exceptions |
SystemExit | Interpreter exit request |
KeyboardInterrupt | User Interrupt Executing (usually enter ^ C) |
StopIteration | Iterator no more value |
GeneratorExit | To notify the exit exception generator (generator) occurs |
StandardError | All standard exceptions built base class |
ArithmeticError | All numerical errors base class |
FloatingPointError | Floating-point calculation error |
OverflowError | Exceeds the maximum limit value calculation |
ZeroDivisionError | In addition to (or modulus) of zero (all data types) |
AssertionError | Assertion failure |
AttributeError | Object does not have this property |
EOFError | No built-in input, to reach the EOF marker |
EnvironmentError | OS Error base class |
IOError | Input / output operations to fail |
OSError | Operating system error |
WindowsError | System call fails |
ImportError | Import module / object failed |
LookupError | Invalid class data base query |
IndexError | Without this sequence index (index) |
KeyError | Without this key mapping |
MemoryError | Memory overflow error (for Python interpreter is not fatal) |
NameError | Undeclared / initialize objects (no attributes) |
UnboundLocalError | Local access uninitialized variables |
ReferenceError | Weak reference object (Weak reference) have been trying to access a garbage collection of |
RuntimeError | General runtime error |
NotImplementedError | The method has not been implemented |
SyntaxError | Python syntax error |
IndentationError | Indentation errors |
TabError | Tab and space mix |
SystemError | General interpreter system error |
TypeError | Invalid type of operation |
ValueError | Invalid parameter passed |
UnicodeError | Unicode related errors |
UnicodeDecodeError | Unicode 解码时的错误 |
UnicodeEncodeError | Unicode 编码时错误 |
UnicodeTranslateError | Unicode 转换时错误 |
Warning | 警告的基类 |
DeprecationWarning | 关于被弃用的特征的警告 |
FutureWarning | 关于构造将来语义会有改变的警告 |
OverflowWarning | 旧的关于自动提升为长整型(long)的警告 |
PendingDeprecationWarning | 关于特性将会被废弃的警告 |
RuntimeWarning | 可疑的运行时行为(runtime behavior)的警告 |
SyntaxWarning | 可疑的语法的警告 |
UserWarning | 用户代码生成的警告 |
Python exception handling type
Guess you like
Origin blog.csdn.net/lan_yangbi/article/details/93754791
Ranking