What is the relationship between Errors, Exceptions and Interrupts in Python 3? -


in python 3 there many types of exception. exception names end "error" (for example, standarderror, overflowerror). other exceptions not end in error (eg. keyboardinterrupt, systemexit).

are errors derived class exception? exceptions interrupt program execution?

is inheritance tree accurate?

errors -> exceptions -> interrupt

docs:

exception: built-in, non-system-exiting exceptions derived class. user-defined exceptions should derived class.

so, systemexit , keyboardinterrupt meant terminate program (and don't expect except exception catch them; if want catch them, need more specific); generatorexit explained in docs itself.


Comments

Popular posts from this blog

javascript - Trigger mouseenter when an animated element touches mouse -

json - Zend error Connection -

java - Using Spring @Transactional with a combination of readOnly and write, when does this entity get committed? -