summaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-05-29 13:03:34 +0300
committerWolfy-J <[email protected]>2018-05-29 13:03:34 +0300
commitb8bc792b263a3891e125757a35cc563bb85f1a0b (patch)
treef7a9e6f2568220491a26f6544e4acf0ed62012bb /errors.go
parent50f820833eeef8518b3b978b33c6f20391225162 (diff)
nested observers
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/errors.go b/errors.go
new file mode 100644
index 00000000..03aa142a
--- /dev/null
+++ b/errors.go
@@ -0,0 +1,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)
+}