From 25062239e27b7c86cdc11ddeaf9b101e4ac542e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20-=20=E3=82=A2=E3=83=AC=E3=83=83=E3=82=AF=E3=82=B9?= Date: Mon, 22 Apr 2024 09:18:46 +0200 Subject: [PATCH] Update errors.go.tmpl --- errors.go.tmpl | 5 +++++ 1 file changed, 5 insertions(+) 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)