[#521] *: use stdlib errors package

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-05-18 11:12:51 +03:00 committed by Alex Vanin
parent 43e575cec2
commit 71b87155ef
171 changed files with 825 additions and 674 deletions

View file

@ -1,7 +1,8 @@
package engine
import (
"github.com/pkg/errors"
"fmt"
"go.uber.org/zap"
)
@ -12,7 +13,7 @@ func (e *StorageEngine) Open() error {
for id, sh := range e.shards {
if err := sh.Open(); err != nil {
return errors.Wrapf(err, "could not open shard %s", id)
return fmt.Errorf("could not open shard %s: %w", id, err)
}
}
@ -26,7 +27,7 @@ func (e *StorageEngine) Init() error {
for id, sh := range e.shards {
if err := sh.Init(); err != nil {
return errors.Wrapf(err, "could not initialize shard %s", id)
return fmt.Errorf("could not initialize shard %s: %w", id, err)
}
}