gufo.err.types¶
Public API data types.
Anchor
dataclass
¶
Bases: object
Exact problem position (Python 3.11+).
Denotes operator of subscript which causes the problem.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
left
|
int
|
Starting column. |
required |
right
|
int
|
Stopping column. |
required |
CodePosition
dataclass
¶
Bases: object
Exact code position for Python 3.11+.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start_line
|
int
|
First line of code |
required |
end_line
|
int
|
Last line of code |
required |
start_col
|
int
|
Starting column (on start_line) |
required |
end_col
|
int
|
Ending column (on end_line) |
required |
anchor
|
Optional[Anchor]
|
Problem anchor |
required |
ErrorInfo
dataclass
¶
Bases: object
Current execution frame information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Application or service name, as set by setup() |
required |
version
|
str
|
Application or service version, as set by setup() |
required |
fingerprint
|
UUID
|
Error fingerprint. |
required |
stack
|
List[FrameInfo]
|
List of |
required |
exception
|
BaseException
|
Exception instance, if caught. |
required |
timestamp
|
Optional[datetime]
|
Error timestamp. |
None
|
root_module
|
Optional[str]
|
Optional root module, as set by setup() |
None
|
ExceptionStub
¶
Bases: Exception
Stub to deserialized exceptions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kls
|
str
|
Exception class name |
required |
args
|
Tuple[Any, ...]
|
Exception arguments |
required |
__str__()
¶
Format exception to string.
Returns:
Type | Description |
---|---|
str
|
Formatted string. |
FrameInfo
dataclass
¶
Bases: object
Execution frame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Current callable name. |
required |
source
|
Optional[SourceInfo]
|
Optional |
required |
locals
|
Dict[str, Any]
|
Dicts of local variables. |
required |
module
|
Optional[str]
|
Python module name. |
None
|
SourceInfo
dataclass
¶
Bases: object
Source context for frame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file_name
|
str
|
Normalized file name. |
required |
first_line
|
int
|
first line of source context. |
required |
current_line
|
int
|
current execution line. |
required |
lines
|
List[str]
|
List of lines, starting from |
required |
pos
|
Optional[CodePosition]
|
Optional exact code position for Python 3.11+ |
None
|