Skip to main content

ErrorTracker

Track errors and aggregates their counts by similarity.

Index

Methods

__init__

  • __init__(*, show_error_name, show_file_and_line_number, show_error_message, show_full_message): None
  • Parameters

    • optionalkeyword-onlyshow_error_name: bool = True
    • optionalkeyword-onlyshow_file_and_line_number: bool = True
    • optionalkeyword-onlyshow_error_message: bool = True
    • optionalkeyword-onlyshow_full_message: bool = False

    Returns None

add

  • add(error): None
  • Include an error in the statistics.


    Parameters

    • error: Exception

    Returns None

get_most_common_errors

  • get_most_common_errors(n): list[tuple[str | None, int]]
  • Return n most common errors.


    Parameters

    • optionaln: int = 3

    Returns list[tuple[str | None, int]]

Properties

total

total: int

Total number of errors.

unique_error_count

unique_error_count: int

Number of distinct kinds of errors.