Skip to content

Instantly share code, notes, and snippets.

@ironpythonbot
Created December 9, 2014 17:55
Show Gist options
  • Save ironpythonbot/55cda3c7b1439104d16a to your computer and use it in GitHub Desktop.
Save ironpythonbot/55cda3c7b1439104d16a to your computer and use it in GitHub Desktop.
CodePlex Issue #31547 Plain Text Attachments
import sys
def tf(frame, event, arg):
if event == 'exception':
print arg[2].tb_lineno
return tf
sys.settrace(tf)
def f():
crash
try:
f()
except:
import sys
type, value, tb = sys.exc_info()
print tb.tb_lineno
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment