Python 常见的错误类型和继承关系
程序员文章站
2022-05-27 19:42:59
Python所有的错误都是从BaseException类派生 ......
python所有的错误都是从baseexception
类派生
baseexception +-- systemexit +-- keyboardinterrupt +-- generatorexit +-- exception +-- stopiteration +-- stopasynciteration +-- arithmeticerror | +-- floatingpointerror | +-- overflowerror | +-- zerodivisionerror +-- assertionerror +-- attributeerror +-- buffererror +-- eoferror +-- importerror | +-- modulenotfounderror +-- lookuperror | +-- indexerror | +-- keyerror +-- memoryerror +-- nameerror | +-- unboundlocalerror +-- oserror | +-- blockingioerror | +-- childprocesserror | +-- connectionerror | | +-- brokenpipeerror | | +-- connectionabortederror | | +-- connectionrefusederror | | +-- connectionreseterror | +-- fileexistserror | +-- filenotfounderror | +-- interruptederror | +-- isadirectoryerror | +-- notadirectoryerror | +-- permissionerror | +-- processlookuperror | +-- timeouterror +-- referenceerror +-- runtimeerror | +-- notimplementederror | +-- recursionerror +-- syntaxerror | +-- indentationerror | +-- taberror +-- systemerror +-- typeerror +-- valueerror | +-- unicodeerror | +-- unicodedecodeerror | +-- unicodeencodeerror | +-- unicodetranslateerror +-- warning +-- deprecationwarning +-- pendingdeprecationwarning +-- runtimewarning +-- syntaxwarning +-- userwarning +-- futurewarning +-- importwarning +-- unicodewarning +-- byteswarning +-- resourcewarning
上一篇: 玛雅历为什么截至到2012.12.21
下一篇: 解决redis服务启动失败的问题