-
Notifications
You must be signed in to change notification settings - Fork 0
/
Errors.go
30 lines (22 loc) · 786 Bytes
/
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
27
28
29
30
package asciichgolangpublic
import "errors"
type ErrorsService struct{}
func Errors() (e *ErrorsService) {
return new(ErrorsService)
}
func NewErrorsService() (e *ErrorsService) {
return new(ErrorsService)
}
// Returns true if given error 'err' is a TracedError, false otherwise.
func (e ErrorsService) IsTracedError(err error) (isTracedError bool) {
return errors.Is(err, ErrTracedError)
}
func (e ErrorsService) IsEmptyStringError(err error) (isEmptyStringError bool) {
return errors.Is(err, ErrTracedErrorEmptyString)
}
func (e ErrorsService) IsNilError(err error) (IsNilError bool) {
return errors.Is(err, ErrTracedErrorNil)
}
func (e ErrorsService) IsNotImplementedError(err error) (isNotImplementedError bool) {
return errors.Is(err, ErrTracedErrorNotImplemented)
}