Exception handlers handle Exceptions occur inside functions. : Exception Handle « Exception « Python
- Python
- Exception
- Exception Handle
Exception handlers handle Exceptions occur inside functions.

def this_fails():
x = 1/0
try:
this_fails()
except ZeroDivisionError, detail:
print 'Handling run-time error:', detail
Related examples in the same category