-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
errors.go
25 lines (19 loc) · 821 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
package cookie
import (
"errors"
"reflect"
)
// ErrInvalidSignedCookieFormat is returned when the format of a signed cookie is invalid.
var ErrInvalidSignedCookieFormat = errors.New("invalid signed cookie format")
// ErrInvalidCookieSignature is returned when the signature of a signed cookie is invalid.
var ErrInvalidCookieSignature = errors.New("invalid cookie signature")
// ErrNonNilPointerRequired is returned when the destination parameter must be a non-nil pointer.
var ErrNonNilPointerRequired = errors.New("dest must be a non-nil pointer")
// ErrUnsupportedType is returned when a field type is not supported.
type ErrUnsupportedType struct {
Type reflect.Type
}
// Error returns the error message.
func (e *ErrUnsupportedType) Error() string {
return "cookie: unsupported type: " + e.Type.String()
}