Language Features

PyTraceback

Python stdlib module — traceback. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.clear_frames()Neutral
#
Signature
clear_frames(tb)

Clear all references to local variables in the frames of a traceback.

.extract_stack()Neutral
#
Signature
extract_stack(f, limit)

Extract the raw traceback from the current stack frame.

.extract_tb()Neutral
#
Signature
extract_tb(tb, limit)

Return a StackSummary object representing a list of

.format_exc()Neutral
#
Signature
format_exc(limit, chain)

Like print_exc() but return a string.

.format_exception()Neutral
#
Signature
format_exception(exc, value, tb, limit, chain)

Format a stack trace and the exception information.

.format_exception_only()Neutral
#
Signature
format_exception_only(exc, value)

Format the exception part of a traceback.

.format_list()Neutral
#
Signature
format_list(extracted_list)

Format a list of tuples or FrameSummary objects for printing.

.format_stack()Neutral
#
Signature
format_stack(f, limit)

Shorthand for 'format_list(extract_stack(f, limit))'.

.format_tb()Neutral
#
Signature
format_tb(tb, limit)

A shorthand for 'format_list(extract_tb(tb, limit))'.

.print_exc()Neutral
#
Signature
print_exc(limit, file, chain)

Shorthand for 'print_exception(*sys.exc_info(), limit, file)'.

Fully-Qualified Names

FQNField
tracebackfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
import traceback