Repository navigation
Expand file tree
/
Copy patherrors.go
More file actions
61 lines (43 loc) · 1.29 KB
/
Copy patherrors.go
File metadata and controls
61 lines (43 loc) · 1.29 KB
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
package firehose
import "errors"
// Sentinel errors used for control flow and classification.
var (
ErrInputNoMatch = errors.New("no match")
ErrOutputNoMatch = errors.New("output no match")
)
// ConditionError wraps an error that occurred during If evaluation.
type ConditionError struct{ Err error }
func (e ConditionError) Error() string {
if e.Err == nil {
return "condition"
}
return "condition: " + e.Err.Error()
}
func (e ConditionError) Unwrap() error { return e.Err }
// ActionError wraps an error returned by Action.Process.
type ActionError struct{ Err error }
func (e ActionError) Error() string {
if e.Err == nil {
return "action"
}
return "action: " + e.Err.Error()
}
func (e ActionError) Unwrap() error { return e.Err }
// ReduceError wraps an error returned by Reducer.Reduce.
type ReduceError struct{ Err error }
func (e ReduceError) Error() string {
if e.Err == nil {
return "reduce"
}
return "reduce: " + e.Err.Error()
}
func (e ReduceError) Unwrap() error { return e.Err }
// DestinationError wraps an error returned by Destination.Send.
type DestinationError struct{ Err error }
func (e DestinationError) Error() string {
if e.Err == nil {
return "destination"
}
return "destination: " + e.Err.Error()
}
func (e DestinationError) Unwrap() error { return e.Err }