diff options
Diffstat (limited to 'core/errors.go')
-rw-r--r-- | core/errors.go | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/core/errors.go b/core/errors.go deleted file mode 100644 index 50772b6..0000000 --- a/core/errors.go +++ /dev/null @@ -1,35 +0,0 @@ -package core - -import "fmt" - -type PermanentError struct { - Err error -} - -func NewPermanentError(err error) *PermanentError { - if err == nil { - return nil - } - - return &PermanentError{Err: err} -} - -func (e *PermanentError) Error() string { - return fmt.Sprintf("permanent client error: %s", e.Err.Error()) -} - -type UnexpectedError struct { - Err error -} - -func NewUnexpectedError(err error) *UnexpectedError { - if err == nil { - return nil - } - - return &UnexpectedError{Err: err} -} - -func (e *UnexpectedError) Error() string { - return fmt.Sprintf("unexpected client error: %s", e.Err.Error()) -} |