Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. import sys, os
  2.  
  3. try:
  4. raise NotImplementedError("No error")
  5. except Exception as e:
  6. exc_type, exc_obj, exc_tb = sys.exc_info()
  7. fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
  8. print(exc_type, fname, exc_tb.tb_lineno)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement