MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / compact_traceback

Function compact_traceback

tools/python-3.11.9-amd64/Lib/asyncore.py:538–556  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

536# ---------------------------------------------------------------------------
537
538def compact_traceback():
539 t, v, tb = sys.exc_info()
540 tbinfo = []
541 if not tb: # Must have a traceback
542 raise AssertionError("traceback does not exist")
543 while tb:
544 tbinfo.append((
545 tb.tb_frame.f_code.co_filename,
546 tb.tb_frame.f_code.co_name,
547 str(tb.tb_lineno)
548 ))
549 tb = tb.tb_next
550
551 # just to be safe
552 del tb
553
554 file, function, line = tbinfo[-1]
555 info = ' '.join(['[%s|%s|%s]' % x for x in tbinfo])
556 return (file, function, line), t, v, info
557
558def close_all(map=None, ignore_all=False):
559 if map is None:

Callers 1

handle_errorMethod · 0.85

Calls 3

strFunction · 0.85
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected