WithCause adds an underlying cause error. Wraps another error as the cause of this error, enabling error chaining and unwrapping with errors.Is and errors.As. Parameters: - cause: The underlying error that caused this error Returns the same Error instance with cause added (for method chaining).
(cause error)
| 427 | // |
| 428 | // Note: WithCause modifies the error in-place and returns it for chaining. |
| 429 | func (e *Error) WithCause(cause error) *Error { |
| 430 | e.Cause = cause |
| 431 | return e |
| 432 | } |
| 433 | |
| 434 | // IsCode checks if an error has a specific error code. |
| 435 | // |
no outgoing calls