Should I prefer sys.exc_info() over sys.last_value and friends (sys.last_type, sys.last_traceback)?
Should I prefer sys.exc_info() over sys.last_value and friends ( sys.last_type , sys.last_traceback )?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looking at the documentation of
sys.last_valueand friends:So, if you are in an interpreter doing debugging I suggest using
sys.last_value, but in a script I suggest you to usesys.exc_info().