Notice in the code below that foobar()
is called if any Exception is thrown. Is there a way to do this without using the same line in every Exception?
try:
foo()
except(ErrorTypeA):
bar()
foobar()
except(ErrorTypeB):
baz()
foobar()
except(SwineFlu):
print 'You have caught Swine Flu!'
foobar()
except:
foobar()