Skip to content

Instantly share code, notes, and snippets.

Created November 12, 2018 00:02
What would you like to do?
def decoratorFunction(func):
print "In Decorator Before function call"
def _fn():
ret = func()
return ret
except IOError as e:
print "I/O error"
except ValueError as e:
print "Value error"
return _fn
def rollback():
print "in rollback"
def rollback2():
print "in rollback2"
def functionAudience():
print "Inside functionAudience"
h = 1 / 1
except Exception as e:
print "inside zerodivision error 1"
raise IOError()
return "Everything Went well"
if __name__ == '__main__':
hi = functionAudience()
import pdb;pdb.set_trace()
print "This would never get called in exception situation"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment