Baseexception +--systemexit #系统结束 +--keyboardinterrupt #键盘中断 ctrl+d +--generatorexit #主动结束 +--Exception #异常 +--S Topiteration #迭代器错误 +--StandardError #标准错误 | +--Buffererror #buff错误 | +--Arithmeticerror #数学错误 | | +--Floatingpointerror #浮点数错误 | | +--Overflowerror #溢出 | | +--Zerodivisionerror #除零 | +--Assertionerror #断言错误 | +--Attributeerror #属性错误 | +--EnvironmentError #环境错误 | | +--IOError #IO错误 | | +--OSError #操作系统错误 | | +--windowserror (Windows) #windows错误 | | +--vmserror (VMS) #vms错误 | +--Eoferror #文件结束符eof错误 | +--Importerror #导入错误 | +--Lookuperror #查找错误 | | +--Indexerror #下标错误 | | +--Keyerror #key值错误 | +--Memoryerror #内存错误 | +--Nameerror #命名错误 | | +--Unboundlocalerror #无边界位置错误 | +--Referenceerror #引用错误 | +--RuntimeError #运行时错误 | | +--Notimplementederror #未实现错误 | +--SyntaxError #语法错误 | | +--Indentationerror #标识符错误 | | +--Taberror #tab错误 | +--Systemerror #系统错误 | +--TypeError #类型错误 | +--ValueError #值错误 | +--Unicodeerror #unicode错误 | +--Unicodedecodeerror #unicode解码错误 | +--Unicodeencodeerror #unicode编码错误 | +--unicodetranslateerror #unicode翻译错误 +--Warning #警告 +--deprecationwarning #弃用警告 +--Pendingde Precationwarning #即将弃用的警告 +--runtimewarning #运行时警告 +--syntaxwarning #语法警告 +--userwarning #用户警告 +--futurewarning #功能警告 +--importwarning #导入警告 +--unicodewarning #unicode警告 +--byteswarning #字节警告
Common error types and inheritance relationships for Python