DeferArgs on GitHub
def foo():
assert False
@catch(AssertionError)
def onAssert(error):
print "OOPS"
@catch()
def onOthers(error):
print "I WOULD BE REACHED FOR ANYTHING NOT CAUGHT ABOVE."
@cleanup
def _(r):
print "The result was: ", r

0 comments:
Post a Comment