Skip to content

Instantly share code, notes, and snippets.

@lfalanga
Last active December 15, 2019 00:06
Show Gist options
  • Save lfalanga/5431149 to your computer and use it in GitHub Desktop.
Save lfalanga/5431149 to your computer and use it in GitHub Desktop.
import sys, os
try:
raise NotImplementedError("No error")
except Exception as e:
exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
error_desc = str(exc_type), fname, str(exc_tb.tb_lineno)
print(' - '.join(error_desc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment