diff --git a/errors.go.tmpl b/errors.go.tmpl index f31fd6b..cccd72f 100644 --- a/errors.go.tmpl +++ b/errors.go.tmpl @@ -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)