IsCausedByError
No overview available.
def IsCausedByError(
e: error,
e2: error
) - > bool
Checks if an error e is caused by another error e2 by recursively unwrapping the error chain. This function is useful for determining if a specific underlying error is present within a complex error structure.
Parameters
| Name | Type | Description |
|---|---|---|
| e | error | The error to inspect, which may be part of an error chain. |
| e2 | error | The specific error to look for within the error chain of e. |
Returns
| Type | Description |
|---|---|
bool | True if e or any of its causes in the error chain is e2, otherwise False. |