diff --git a/exerr/builder.go b/exerr/builder.go index 3411026..67ccf97 100644 --- a/exerr/builder.go +++ b/exerr/builder.go @@ -415,6 +415,10 @@ func (b *Builder) Extra(key string, val any) *Builder { // Can be gloablly configured with ZeroLogErrTraces and ZeroLogAllTraces // Can be locally suppressed with Builder.NoLog() func (b *Builder) Build(ctxs ...context.Context) error { + return b.BuildAsExerr(ctxs...) +} + +func (b *Builder) BuildAsExerr(ctxs ...context.Context) *ExErr { warnOnPkgConfigNotInitialized() for _, dctx := range ctxs { @@ -422,7 +426,7 @@ func (b *Builder) Build(ctxs ...context.Context) error { } if pkgconfig.DisableErrorWrapping && b.wrappedErr != nil { - return b.wrappedErr + return FromError(b.wrappedErr) } if pkgconfig.ZeroLogErrTraces && !b.noLog && (b.errorData.Severity == SevErr || b.errorData.Severity == SevFatal) { diff --git a/goextVersion.go b/goextVersion.go index 009e526..20e5bc4 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.565" +const GoextVersion = "0.0.566" -const GoextVersionTimestamp = "2025-02-28T21:43:36+0100" +const GoextVersionTimestamp = "2025-02-28T21:46:26+0100"