-
Notifications
You must be signed in to change notification settings - Fork 6
/
errors.go
31 lines (22 loc) · 1.25 KB
/
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
27
28
29
30
31
package state
import (
"github.com/pkg/errors"
)
var (
// ErrUnableToCreateStateKey can occurs while creating composite key for entry
ErrUnableToCreateStateKey = errors.New(`unable to create state key`)
// ErrUnableToCreateEventName can occurs while creating composite key for entry
ErrUnableToCreateEventName = errors.New(`unable to create event name`)
// ErrKeyAlreadyExists can occurs when trying to insert entry with existing key
ErrKeyAlreadyExists = errors.New(`state key already exists`)
// ErrKeyNotFound key not found in chaincode state
ErrKeyNotFound = errors.New(`state entry not found`)
// ErrAllowOnlyOneValue can occurs when trying to call Insert or Put with more than 2 arguments
ErrAllowOnlyOneValue = errors.New(`allow only one value`)
// ErrStateEntryNotSupportKeyerInterface can occurs when trying to Insert or Put struct
// providing key and struct without Keyer interface support
ErrStateEntryNotSupportKeyerInterface = errors.New(`state entry not support keyer interface`)
ErrEventEntryNotSupportNamerInterface = errors.New(`event entry not support name interface`)
// ErrKeyPartsLength can occurs when trying to create key consisting of zero parts
ErrKeyPartsLength = errors.New(`key parts length must be greater than zero`)
)