There are two differences:
- The relative order in which exceptions and block endings are executed. In version 1, it is finally executed before the exception. In version 2, the exception order is canceled.
- In version 1, if the finally block is raised, then it will be processed by the except block. In version 2, if the finally block is raised, then it will be processed by the next one containing the exception handler, that is, outside this code.
, . , , , -, , .
, , , , . , .