11, python exception mechanism

Python exception: python encounter unusual program will terminate, after the code will not be executed, in order to continue executing the code after, we need to catch the exception and throw

 Exception type reference links:  https://www.runoob.com/python/python-exceptions.html

 

    

 

   

 

 exception: exception is the base class for all classes

 If there is more except when, Exception base class exception must be placed last, behind exception class or he would never be found

 

 

 

 

Guess you like

Origin www.cnblogs.com/yhms/p/11498914.html