python_ Exception Handling

The basic syntax:

the while True:
     # If you try the following code error except the following code is executed, if not wrong then continue else the code below, regardless of the error is not an error is executed finally the code below 
    try :
         Pass 
    except Exception AS ERR: # error information encapsulated err in 
        # output an error message 
        Print (err)
     the else :
         Pass 
    a finally :

 

Guess you like

Origin www.cnblogs.com/wangdianchao/p/11710656.html