1 2 3 4 5 6 7 8 |
import sys, os try: raise NotImplementedError("No error") except Exception as e: exc_type, exc_obj, exc_tb = sys.exc_info() exc_type, exc_obj, exc_tb = sys.exc_info() fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] print(exc_type, fname, exc_tb.tb_lineno) |
Yes, it's thread-safe. sys.exc_info() was introduced to deal with thread-safety problems in the previous API. Its output is specific t
0 Comments
Your comment will be posted after it is approved.
Leave a Reply. |
Other Blogs & PagesGit Commands Animation & VFX SitesA MUST READ for Ani/VFX Artistson the shoulders of giants and some
|