File tree 2 files changed +3
-12
lines changed
2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 11
11
// Handler is a function type used to process error values in Handle and
12
12
// Catch. We currently have a few build-ins of the Handler: err2.Noop,
13
13
// err2.Reset, etc.
14
- Handler = func ( error ) error
14
+ Handler = handler. ErrorFn
15
15
)
16
16
17
17
var (
Original file line number Diff line number Diff line change @@ -5,17 +5,8 @@ import (
5
5
"os"
6
6
)
7
7
8
- // Handlers is a helper to call several error handlers in a sequence.
9
- //
10
- // defer err2.Handle(&err, err2.Handlers(err2.Log, MapToHTTPErr))
11
- func Handlers (f ... Handler ) Handler {
12
- return func (err error ) error {
13
- for _ , handler := range f {
14
- err = handler (err )
15
- }
16
- return err
17
- }
18
- }
8
+ "github.com/lainio/err2/internal/handler"
9
+ )
19
10
20
11
// Stderr is a built-in helper to use with Handle and Catch. It prints the
21
12
// error to stderr and it resets the current error value. It's a handy Catch
You can’t perform that action at this time.
0 commit comments