-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
49 lines (36 loc) · 823 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package cmap
import "fmt"
type IllegalParameterError struct {
msg string
}
func newIllegalParameterError(errMsg string) IllegalParameterError {
return IllegalParameterError{
msg: errMsg,
}
}
func (ipe IllegalParameterError) Error() string {
return ipe.msg
}
type IllegalPairTypeError struct {
msg string
}
// 等待修改 pair
func newIllegalPairTypeError(pair Pair) IllegalPairTypeError {
return IllegalPairTypeError{
msg: fmt.Sprintf("concurrent map: illegal pair type: %T", pair),
}
}
func (ipte IllegalPairTypeError) Error() string {
return ipte.msg
}
type PairRedistributorError struct {
msg string
}
func newPairRedistributorError(errMsg string) PairRedistributorError {
return PairRedistributorError{
msg: errMsg,
}
}
func (pre PairRedistributorError) Error() string {
return pre.msg
}