Catch exception in a function
def doNotRaiseException(): try: print "In doNotRaiseException" finally: print "Finally executed in doNotRaiseException" print "End of doNotRaiseException" print "Calling doNotRaiseException" doNotRaiseException()
1. | Simple exception handling example | ||
2. | Handling Exceptions | ||
3. | handle multiple exceptions | ||
4. | Demonstrates handling exceptions | ||
5. | Exception handlers handle Exceptions occur inside functions. |