How to check exception thrown in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to check exception thrown in python?

i want to check which exception is thrown using try except.

22nd Sep 2020, 4:21 AM
NIKHIL SINGH
NIKHIL SINGH - avatar
2 Answers
+ 2
try: # whatever except Exception as e: print(e) Also look at the error code. Its all in there
22nd Sep 2020, 7:21 AM
Slick
Slick - avatar
0
ok... do it
22nd Sep 2020, 5:21 AM
Oma Falk
Oma Falk - avatar