Commit bc08913
authored
Full rewrite (#14)
This release is a full rewrite of the `errors` package. See the README for further details.
#### Added
* `Caller` interface
* `Error` interface
* Exported methods
- `Errorf(msg string, data ...interface{}) Error`
- `GetCaller(err error) Caller`
- `Has(err, test error) bool`
- `Is(err, test error) bool`
- `Trace(e error) Error`
- `Track(e error) Error`
#### Changed
* Exported methods
- `New(code std.Code, msg string, data ...interface{}) *Err`
- `New(msg string) Error`
- `Wrap(err error, code std.Code, msg string, data ...interface{}) *Err`
- `Wrap(e error, msg string, data ...interface{}) Error`
#### Removed
* Exported methods
- `From(code std.Code, err error) *Err`
* Support for error codes
* Support for sanitized vs raw error messages
* Support for HTTP status codes1 parent f412589 commit bc08913
18 files changed
Lines changed: 956 additions & 1282 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
4 | 21 | | |
5 | | - | |
6 | | - | |
| 22 | + | |
7 | 23 | | |
8 | 24 | | |
9 | 25 | | |
| |||
14 | 30 | | |
15 | 31 | | |
16 | 32 | | |
| 33 | + | |
17 | 34 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 17 | | |
22 | 18 | | |
23 | 19 | | |
| 20 | + | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments