forked from francoispqt/gojay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
35 lines (26 loc) · 962 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
27
28
29
30
31
32
33
34
35
package gojay
// InvalidJSONError is a type representing an error returned when
// Decoding encounters invalid JSON.
type InvalidJSONError string
func (err InvalidJSONError) Error() string {
return string(err)
}
// InvalidTypeError is a type representing an error returned when
// Decoding cannot unmarshal JSON to the receiver type for various reasons.
type InvalidTypeError string
func (err InvalidTypeError) Error() string {
return string(err)
}
const invalidUnmarshalErrorMsg = "Invalid type %s provided to Unmarshal"
// InvalidUnmarshalError is a type representing an error returned when
// Decoding did not find the proper way to decode
type InvalidUnmarshalError string
func (err InvalidUnmarshalError) Error() string {
return string(err)
}
// NoReaderError is a type representing an error returned when
// decoding requires a reader and none was given
type NoReaderError string
func (err NoReaderError) Error() string {
return string(err)
}