You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is another #262 regression. We call sys.exc_clear in algorithm after any exception handler, so the exc_info call in log_result_of_response always returns nothing.
If we were under Python 3, we would have the traceback object stored on the exception. I decided not to shim that for Python 2 in Algorithm.py. We might review that decision, but for now I propose that we modify get_response_for_exception to store the current traceback object on the response, for use downstream in log_result_of_response. Let's be careful not to create a circular reference with the traceback object, per the Python 2 docs:
Warning: Assigning the traceback return value to a local variable in a function that is handling an exception will cause a circular reference. This will prevent anything referenced by a local variable in the same function or by the traceback from being garbage collected. Since most functions don’t need access to the traceback, the best solution is to use something like exctype, value = sys.exc_info()[:2] to extract only the exception type and value. If you do need the traceback, make sure to delete it after use (best done with a try ... finally statement) or to call exc_info() in a function that does not itself handle an exception.
This is another #262 regression. We call
sys.exc_clear
in algorithm after any exception handler, so theexc_info
call inlog_result_of_response
always returns nothing.If we were under Python 3, we would have the traceback object stored on the exception. I decided not to shim that for Python 2 in Algorithm.py. We might review that decision, but for now I propose that we modify
get_response_for_exception
to store the current traceback object on the response, for use downstream inlog_result_of_response
. Let's be careful not to create a circular reference with the traceback object, per the Python 2 docs:The text was updated successfully, but these errors were encountered: