Exception handling | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Exception handling

Why is it that if a try block doesn't have any exception then my try block is executed first and then my finally block. But if I have an exception in my try block then my finally block executes first and then the exception message is shown.

21st Nov 2019, 10:45 AM
Avinesh
Avinesh - avatar
1 Answer
+ 1
~ swim ~ Thank you, got it.
21st Nov 2019, 11:21 AM
Avinesh
Avinesh - avatar