TaskError
This class represents a serialized error encountered during task execution, storing the exception's class path and its associated traceback. It provides a property to lazily resolve and validate the original exception class from its string path. This allows for error inspection and handling in environments where the original exception object is not directly available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| exception_class_path | str | The full import path of the exception class used to resolve the actual exception type via lazy loading. |
| traceback | str | The string representation of the stack trace associated with the task failure. |
Constructor
Signature
def TaskError(
exception_class_path: string,
traceback: string
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| exception_class_path | string | The import path of the exception class. |
| traceback | string | The string representation of the error traceback. |
Methods
exception_class()
@classmethod
def exception_class() - > type
Lazy resolve the exception class.
Returns
| Type | Description |
|---|---|
type | The Python exception class referenced by the exception_class_path string. |