-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patherrors.go
26 lines (20 loc) · 908 Bytes
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Package customerrors defines errors that can occur while using bptree
package customerrors
import "errors"
var (
// ErrKeyNotFound should be returned from lookup operations when the
// lookup key is not found in index/store.
ErrKeyNotFound = errors.New("key not found")
// ErrKeyTooLarge is returned by index implementations when a key is
// larger than a configured limit if any.
ErrKeyTooLarge = errors.New("key is too large")
// ErrEmptyKey should be returned by backends when an operation is
// requested with an empty key.
ErrEmptyKey = errors.New("empty key")
// ErrImmutable should be returned by backends when write operation
// (put/del) is attempted on a readonly.
ErrImmutable = errors.New("operation not allowed in read-only mode")
// ErrNotFound should be returned when trying update key-value pair
// and key not found in bptree
ErrNotFound = errors.New("not found")
)