yggdrasil.pyutils.exceptions¶
exceptions ¶
Utilities for parsing and re-raising exceptions from traceback strings.
ParsedException
dataclass
¶
Structured representation of a parsed exception type and message.
RemoteTraceback ¶
Bases: Exception
Holds a traceback string and prints it as the chained cause.
Store the traceback text for later display.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
traceback_text
|
str
|
Traceback string to store. |
required |
Returns:
| Type | Description |
|---|---|
None
|
None. |
parse_exception_from_traceback ¶
Parse a traceback string, infer exception class + message. Falls back to RuntimeError if it can't infer a proper built-in exception.
raise_parsed_traceback ¶
Infer exception from traceback text and raise it. Note: cannot recreate original frames; we chain the text as the cause by default.