How to get the name of the exception in try..except
block of Python?
try:
#code that throws errors
except Exception as e:
#A broad except block to catch all errors
#Handling the error
Sometimes when there are a lot of exceptions to handle, catching Exception
seems easy (though discouraged). But I'm not able to find the name of the exception, is there any way to do it?