forked from TrueCloudLab/frostfs-node
[#1732] pilorama: Improve logical error handling
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
ae7b473768
commit
7335a52f29
1 changed files with 4 additions and 3 deletions
|
@ -1,8 +1,9 @@
|
||||||
package pilorama
|
package pilorama
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/util/logicerr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Timestamp is an alias for integer timestamp type.
|
// Timestamp is an alias for integer timestamp type.
|
||||||
|
@ -50,10 +51,10 @@ const (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// ErrTreeNotFound is returned when the requested tree is not found.
|
// ErrTreeNotFound is returned when the requested tree is not found.
|
||||||
ErrTreeNotFound = errors.New("tree not found")
|
ErrTreeNotFound = logicerr.New("tree not found")
|
||||||
// ErrNotPathAttribute is returned when the path is trying to be constructed with a non-internal
|
// ErrNotPathAttribute is returned when the path is trying to be constructed with a non-internal
|
||||||
// attribute. Currently the only attribute allowed is AttributeFilename.
|
// attribute. Currently the only attribute allowed is AttributeFilename.
|
||||||
ErrNotPathAttribute = errors.New("attribute can't be used in path construction")
|
ErrNotPathAttribute = logicerr.New("attribute can't be used in path construction")
|
||||||
)
|
)
|
||||||
|
|
||||||
// isAttributeInternal returns true iff key can be used in `*ByPath` methods.
|
// isAttributeInternal returns true iff key can be used in `*ByPath` methods.
|
||||||
|
|
Loading…
Reference in a new issue