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
raiseAssertionError("Arrived at code in %s() which was marked unreachable."%frame.f_code.co_name)
85
107
else:
86
108
# build a simulated traceback object
87
-
tb=Traceback()
88
-
tb.tb_frame=frame
89
-
tb.tb_lasti=None
90
-
tb.tb_lineno=frame.f_lineno
91
-
tb.tb_next=None
92
-
logger.error("Arrived at code in %s() which was marked unreachable.", frame.f_code.co_name, exc_info=(AssertionError, frame.f_code.co_name, tb))
109
+
tb=build_traceback(stack)
110
+
# provide extra info if available
111
+
extra= {}
112
+
forkeyin [ 'request', 'status_code', ]:
113
+
ifkeyinframe.f_locals:
114
+
extra[key] =frame.f_locals[key]
115
+
logger.error("Arrived at code in %s() which was marked unreachable.", frame.f_code.co_name, exc_info=(AssertionError, frame.f_code.co_name, tb), extra=extra)
0 commit comments