Updates to internal/operations/backup.go

Replaces clues return for wrapped error with stack trace.
This commit is contained in:
Danny Adams 2023-02-02 23:52:10 -05:00
parent 9da0a7878b
commit 758d84e60a

View File

@ -110,7 +110,10 @@ type detailsWriter interface {
func (op *BackupOperation) Run(ctx context.Context) (err error) {
defer func() {
if r := recover(); r != nil {
err = clues.Wrap(r.(error), "panic recovery").WithClues(ctx).With("stacktrace", debug.Stack())
temp := r.(error)
err = errors.Wrapf(temp, "panic recovery: stack trace: %s", string(debug.Stack()))
// TODO rkeepers use clues for error
// err = clues.Wrap(r.(error), "panic recovery").WithClues(ctx).With("stacktrace", debug.Stack())
}
}()