Tag: RAC ble enters instance symbol ACE statement encounters param
The first is to define
Python uses an Exception object (Exception object) to represent an exception, and an exception is thrown when an error is encountered. If the exception object is not handled or captured, the program terminates execution with the so-called backtracking (Traceback, an error message).
And then the usual statements.
Try
<statements> #运行try语句块 and try to catch the exception
Except <name1>: #如果name1异常发现, then execute the statement block.
<statements>
Except (Name2, Name3): #如果元组内的任意异常发生, then capture it
<statements>
Except <name4> as <variable>: #如果name4异常发生, then enter the statement block and name the exception instance variable
<statements>
exception: #任何异常都在这里抛出 span>
<statements>
else:
<statements> #如果没有异常发生, then execute the statement block
finally:
<statement> #无论是否有异常发生, the statement block is executed.
Again down is the manual throw exception
Raise statement
typically used for custom exceptions and then manually throwing
The last sentence is to say that the exception is the son can not solve the problem of dad
Exceptions in Python