summaryrefslogtreecommitdiff
path: root/common/errors.go
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-02 14:52:06 +0800
committerKeuin <[email protected]>2023-07-02 14:52:06 +0800
commit6f7987593a9db5500fa56fef0ec1845a02df9876 (patch)
tree11dd64cfbe07e2d48c224da665932ce39e4f5596 /common/errors.go
parentb6eb2c0da4e653c6fdd278bcbdcd55ec376cd481 (diff)
Refactor: move task error types to separate package.
Diffstat (limited to 'common/errors.go')
-rw-r--r--common/errors.go43
1 files changed, 0 insertions, 43 deletions
diff --git a/common/errors.go b/common/errors.go
deleted file mode 100644
index bdf49fb..0000000
--- a/common/errors.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package common
-
-import (
- "fmt"
-)
-
-/*
-Task errors.
-*/
-
-type RecoverableTaskError struct {
- err error
- message string
-}
-
-func (e *RecoverableTaskError) Error() string {
- return fmt.Sprintf("%v: %v", e.message, e.err)
-}
-
-func (e *RecoverableTaskError) Unwrap() error {
- return e.err
-}
-
-func NewRecoverableTaskError(message string, err error) error {
- return &RecoverableTaskError{message: message, err: err}
-}
-
-type UnrecoverableTaskError struct {
- err error
- message string
-}
-
-func (e *UnrecoverableTaskError) Error() string {
- return fmt.Sprintf("%v: %v", e.message, e.err)
-}
-
-func (e *UnrecoverableTaskError) Unwrap() error {
- return e.err
-}
-
-func NewUnrecoverableTaskError(message string, err error) error {
- return &UnrecoverableTaskError{message: message, err: err}
-}