Get exception description and stack trace which caused an exception
Posted on 2012-12-07 12:18 feisky 阅读(255) 评论(0) 编辑 收藏 举报import traceback try: raise ValueError except: tb = traceback.format_exc() else: tb = "No error" finally: print tb
Original: http://stackoverflow.com/questions/4564559/get-exception-description-and-stack-trace-which-caused-an-exception-all-as-a-st