This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# This code sample shows (what I hope to be) the right way to reraise an exception in the | |
# situation where you have to perform some cleanup before reraising. | |
# | |
cleaned_up = False | |
def raiser(): | |
raise RuntimeError("this should be reported at line 10") |