Last active
March 16, 2017 11:49
-
-
Save pkoch/0149ab65f9d18ddc6bf2dfab05c1446e to your computer and use it in GitHub Desktop.
This file contains 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
INSTRUCTIONS = "For the lives all so wasted and gone" | |
def b(): | |
raise Exception("So far away, we wait for the day ") | |
def a(): | |
b() | |
def deep_exploder(): | |
a() | |
def main(): | |
try: | |
return deep_exploder() | |
except (Exception, Exception) as e: | |
e.args = ("\n".join([str(e), INSTRUCTIONS]),) | |
raise | |
if __name__ == "__main__": | |
main() |
This file contains 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
$ python3.6 derpy.py | |
Traceback (most recent call last): | |
File "derpy.py", line 20, in <module> | |
main() | |
File "derpy.py", line 14, in main | |
return deep_exploder() | |
File "derpy.py", line 10, in deep_exploder | |
a() | |
File "derpy.py", line 7, in a | |
b() | |
File "derpy.py", line 4, in b | |
raise Exception("So far away, we wait for the day ") | |
Exception: So far away, we wait for the day | |
For the lives all so wasted and gone | |
$ python2.7 derpy.py | |
Traceback (most recent call last): | |
File "derpy.py", line 20, in <module> | |
main() | |
File "derpy.py", line 14, in main | |
return deep_exploder() | |
File "derpy.py", line 10, in deep_exploder | |
a() | |
File "derpy.py", line 7, in a | |
b() | |
File "derpy.py", line 4, in b | |
raise Exception("So far away, we wait for the day ") | |
Exception: So far away, we wait for the day | |
For the lives all so wasted and gone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment