IsCausedBy
Gets whether error is caused by another error with errCode.
def IsCausedBy(
e: error,
errCode: ErrorCode
) - > bool
Gets whether error is caused by another error with errCode.
Parameters
| Name | Type | Description |
|---|---|---|
| e | error | The error to check, which may be a wrapped error containing a chain of underlying causes. |
| errCode | ErrorCode | The specific error code to search for within the error chain. |
Returns
| Type | Description |
|---|---|
bool | True if the error chain contains an error with the specified error code, False otherwise. |