+ 12

Exceptions

Are specific exceptions called before general exceptions in Python and C# ?

13th Apr 2019, 2:20 AM
Sanjay Kamath
Sanjay Kamath - avatar
3 Answers
+ 5
Yes That is true. The most general exception is Exception. But if a more specific exception applies, then this block will handle the exception. Only one catch block handles the exception https://www.tutorialsteacher.com/csharp/csharp-exception-handling
13th Apr 2019, 8:10 PM
sneeze
sneeze - avatar
+ 3
in C# General exception not called ,if in code use specific exception. After specific exception will call 'finally' part , if it exist.
13th Apr 2019, 8:58 AM
id001x
id001x - avatar
+ 3
Hi all!)
14th Feb 2020, 8:57 PM
Egor