Skip to content

Commit

Permalink
Update errors.go.tmpl
Browse files Browse the repository at this point in the history
  • Loading branch information
klaidliadon authored Apr 22, 2024
1 parent fc75708 commit 2506223
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions errors.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ func (e WebRPCError) WithCause(cause error) WebRPCError {
return err
}

func (e WebRPCError) WithCausef(msg string, args ...any) WebRPCError {
return e.WithCause(fmt.Errof(msg, args...))
}


// Deprecated: Use .WithCause() method on WebRPCError.
func ErrorWithCause(rpcErr WebRPCError, cause error) WebRPCError {
return rpcErr.WithCause(cause)
Expand Down

0 comments on commit 2506223

Please sign in to comment.