From ab55344a3c18fc39bd063b9a57724b10c6ecd100 Mon Sep 17 00:00:00 2001 From: roeldev Date: Fri, 1 Apr 2022 15:44:01 +0200 Subject: [PATCH] Allow any embedded error in New() --- error.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/error.go b/error.go index fe1d697..54aa792 100644 --- a/error.go +++ b/error.go @@ -46,6 +46,8 @@ func New(msg interface{}) error { switch v := msg.(type) { case *commonError: return v + case *embedError: + return v case string: return newCommonErr(Msg(v), true)