-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
orm.go
28 lines (20 loc) · 1.09 KB
/
orm.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
27
28
package errors
import (
"github.com/cosmos/cosmos-sdk/types/errors"
)
// mathCodespace is the codespace for all errors defined in orm package
const ormCodespace = "orm"
var (
// ErrORMIteratorDone defines an error when an iterator is done
ErrORMIteratorDone = errors.Register(ormCodespace, 11, "iterator done")
// ErrORMInvalidIterator defines an error for an invalid iterator
ErrORMInvalidIterator = errors.Register(ormCodespace, 12, "invalid iterator")
// ErrORMUniqueConstraint defines an error when a value already exists at a given key
ErrORMUniqueConstraint = errors.Register(ormCodespace, 13, "unique constraint violation")
// ErrORMInvalidArgument defines an error when an invalid argument is provided as part of ORM functions
ErrORMInvalidArgument = errors.Register(ormCodespace, 14, "invalid argument")
// ErrORMKeyMaxLength defines an error when a key exceeds max length
ErrORMKeyMaxLength = errors.Register(ormCodespace, 15, "key exceeds max length")
// ErrORMEmptyKey defines an error for an empty key
ErrORMEmptyKey = errors.Register(ormCodespace, 47, "cannot use empty key")
)