-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy patherrors.go
26 lines (22 loc) · 1.01 KB
/
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
package cogman
import "errors"
// list of errors
var (
ErrRequestTimeout = errors.New("cogman: request timeout")
ErrInvalidData = errors.New("cogman: invalid data")
ErrConnectionTimeout = errors.New("cogman: connection timeout")
ErrInvalidConfig = errors.New("cogman: invalid server config")
ErrDuplicateTaskName = errors.New("cogman: duplicate task name")
ErrRunningServer = errors.New("cogman: server is already running")
ErrStoppedServer = errors.New("cogman: server is already stopped")
ErrNoTask = errors.New("cogman: server has no task")
ErrTaskHeadless = errors.New("cogman: headless task")
ErrTaskUnidentified = errors.New("cogman: unidentified task")
ErrTaskUnhandled = errors.New("cogman: unhandled task")
ErrNoTaskID = errors.New("cogman: no task id")
)
// TaskHandlerMissingError is error when task handler is missing
type TaskHandlerMissingError string
func (t TaskHandlerMissingError) Error() string {
return "cogman: task handler missing: " + string(t)
}