Created
September 17, 2013 16:12
-
-
Save zerc/6596594 to your computer and use it in GitHub Desktop.
Логирование трейсбека. И даже не спрашивайте зачем мне это :D
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
def D(fn): | |
import traceback | |
filename = 'trace' | |
def _(*args, **kwargs): | |
try: | |
return fn(*args, **kwargs) | |
except: | |
traceback.print_exc(5, open(filename, 'w')) | |
raise | |
return _ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment