IsCausedByError
No overview available.
def IsCausedByError(
e: error,
e2: error
) - > bool
Checks if an error e is caused by another error e2 by traversing the error chain. This function is useful for determining if a specific underlying error is present within a wrapped error.
Parameters
| Name | Type | Description |
|---|---|---|
| e | error | The error to check, which may be a wrapped error containing a cause. |
| 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 matches e2, otherwise False. |