-
Notifications
You must be signed in to change notification settings - Fork 2
/
errors.go
21 lines (16 loc) · 783 Bytes
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package nebulaorm
import (
"errors"
"github.com/haysons/nebulaorm/clause"
"github.com/haysons/nebulaorm/resolver"
)
var (
// ErrInvalidValue usually because a variable is passed in that doesn't match the expected type
ErrInvalidValue = errors.New("invalid value")
// ErrRecordNotFound methods that query only a single record return this error if they fail to get the record. eg: Take
ErrRecordNotFound = errors.New("record not found")
// ErrValueCannotSet usually because the variable is not passed in as a pointer and cannot be assigned a value
ErrValueCannotSet = resolver.ErrValueCannotSet
// ErrInvalidClauseParams usually because the arguments to the build clause are anomalous, causing the build to fail
ErrInvalidClauseParams = clause.ErrInvalidClauseParams
)