mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-15 12:00:41 +08:00
Initial commit, pt. 70
This commit is contained in:
@@ -3,6 +3,7 @@ package observability
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/facebookincubator/go-belt"
|
||||
"github.com/facebookincubator/go-belt/tool/experimental/errmon"
|
||||
@@ -14,5 +15,6 @@ func PanicIfNotNil(ctx context.Context, r any) {
|
||||
}
|
||||
errmon.ObserveRecoverCtx(ctx, r)
|
||||
belt.Flush(ctx)
|
||||
time.Sleep(time.Second)
|
||||
panic(fmt.Sprintf("%#+v", r))
|
||||
}
|
||||
|
Reference in New Issue
Block a user