Code and data structures for storing and displaying errors.
Class |
|
Represents a position in an error log. |
Class |
|
Representation of an error in the error log. |
Class |
|
ErrorLog with convenience functions. |
Class |
|
A stream of errors. |
Function | get |
Undocumented |
Constant | MAX |
Undocumented |
Constant | MAX |
Undocumented |
Constant | SEVERITY |
Undocumented |
Constant | SEVERITY |
Undocumented |
Constant | TRACEBACK |
Undocumented |
Function | _compare |
Try to compare two traceback strings. |
Function | _dedup |
Dedup the opcodes in a stack of frames. |
Function | _error |
Decorate a function so that it binds the current error name. |
Function | _function |
Undocumented |
Function | _make |
Turn a stack of frames into a traceback string. |
Function | _maybe |
Truncate the traceback if it is too long. |
Constant | _COLOR |
Undocumented |
Constant | _CURRENT |
Undocumented |
Constant | _ELLIPSIS |
Undocumented |
Constant | _ERROR |
Undocumented |
Constant | _FORE |
Undocumented |
Constant | _FORE |
Undocumented |
Constant | _STYLE |
Undocumented |
Constant | _STYLE |
Undocumented |
Type Variable | _ |
Undocumented |
Variable | _log |
Undocumented |
Try to compare two traceback strings. Two traceback strings are comparable if they are equal, or if one ends with the other. For example, these two tracebacks are comparable: Traceback: line 1, in <module> line 2, in foo Traceback: line 2, in foo and the first is greater than the second. Args: left: A string or None. right: A string or None. Returns: None if the inputs aren't comparable, else an integer.
Truncate the traceback if it is too long. Args: traceback: A list representing an error's traceback. There should be one list item per entry in the traceback (in the right order); beyond that, this function does not care about the item types. Returns: The traceback, possibly with some items removed and an _ELLIPSIS inserted. Guaranteed to be no longer than MAX_TRACEBACK_LENGTH.