Auto prepend caller when wrapping errors

This commit is contained in:
Frederik Ring
2024-02-16 15:35:42 +01:00
parent 83fa0aae48
commit 52c22a1891
24 changed files with 313 additions and 222 deletions

View File

@@ -9,6 +9,7 @@ import (
"strings"
"time"
"github.com/offen/docker-volume-backup/internal/errwrap"
"golang.org/x/sync/errgroup"
)
@@ -47,7 +48,7 @@ func (s *script) pruneBackups() error {
}
if err := eg.Wait(); err != nil {
return fmt.Errorf("pruneBackups: error pruning backups: %w", err)
return errwrap.Wrap(err, "error pruning backups")
}
return nil