summaryrefslogtreecommitdiff
path: root/errors.go
blob: 03aa142ac993071995a1a56e25176caf9abc49af (plain)
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
package roadrunner

// JobError is job level error (no worker halt), wraps at top
// of error context
type JobError []byte

// Error converts error context to string
func (je JobError) Error() string {
	return string(je)
}

// WorkerError is worker related error
type WorkerError struct {
	// Worker
	Worker *Worker

	// Caused error
	Caused error
}

// Error converts error context to string
func (e WorkerError) Error() string {
	return e.Caused.Error()
}

// PoolError is pool wide error
type PoolError string

// Error converts error context to string
func (e PoolError) Error() string {
	return string(e)
}