v0.0.466 exerr.Wrap now inherits the Severity of the wrapped error
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m24s

This commit is contained in:
2024-06-03 13:48:30 +02:00
parent d2bb362135
commit 12fa53d848
3 changed files with 5 additions and 4 deletions

View File

@@ -493,11 +493,12 @@ func (b *Builder) Format(level LogPrintLevel) string {
// If the error is SevErr we also send it to the error-service
func (b *Builder) Fatal(ctxs ...context.Context) {
b.errorData.Severity = SevFatal
for _, dctx := range ctxs {
b.CtxData(MethodFatal, dctx)
}
b.errorData.Severity = SevFatal
b.errorData.Log(stackSkipLogger.WithLevel(zerolog.FatalLevel))
b.errorData.CallListener(MethodFatal)