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

Function extract_tb

tools/python-3.11.9-amd64/Lib/traceback.py:61–75  ·  view source on GitHub ↗

Return a StackSummary object representing a list of pre-processed entries from traceback. This is useful for alternate formatting of stack traces. If 'limit' is omitted or None, all entries are extracted. A pre-processed stack trace entry is a FrameSummary object c

(tb, limit=None)

Source from the content-addressed store, hash-verified

59 return extract_tb(tb, limit=limit).format()
60
61def extract_tb(tb, limit=None):
62 """
63 Return a StackSummary object representing a list of
64 pre-processed entries from traceback.
65
66 This is useful for alternate formatting of stack traces. If
67 'limit' is omitted or None, all entries are extracted. A
68 pre-processed stack trace entry is a FrameSummary object
69 containing attributes filename, lineno, name, and line
70 representing the information that is usually printed for a stack
71 trace. The line is a string with leading and trailing
72 whitespace stripped; if the source is not available it is None.
73 """
74 return StackSummary._extract_from_extended_frame_gen(
75 _walk_tb_with_full_positions(tb), limit=limit)
76
77#
78# Exception formatting and output.

Callers 2

print_tbFunction · 0.70
format_tbFunction · 0.70

Tested by

no test coverage detected