-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.go
63 lines (47 loc) · 1.19 KB
/
error.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package named_pipe_ipc
import "fmt"
const (
AlreadyExistButNotNamedPipeMessage = "Already exist but which not named pipe"
NotDirectoryMessage = "It is not a directory, because it has to be a directory"
NoMessageMessage = "Not receive message"
MessageNotLegalMessage = "Message is not legal"
NoPipeExistMessage = "No pipe exist"
PipeClosedMessage = "pipe closed"
)
type AlreadyExistButNotNamedPipe struct {
}
func (e AlreadyExistButNotNamedPipe) Error() string {
return AlreadyExistButNotNamedPipeMessage
}
type NotDirectory struct {
}
func (e NotDirectory) Error() string {
return NotDirectoryMessage
}
type MessageNotLegal struct {
}
func (e MessageNotLegal) Error() string {
return MessageNotLegalMessage
}
type NoMessage struct {
}
func (e NoMessage) Error() string {
return NoMessageMessage
}
type NoPipeExist struct {
}
func (e NoPipeExist) Error() string {
return NoPipeExistMessage
}
type Closed struct {
}
func (e Closed) Error() string {
return PipeClosedMessage
}
type HybridError struct {
EA error
EB error
}
func (e HybridError) Error() string {
return fmt.Sprintf("EA: %v, EB: %v", e.EA, e.EB)
}