You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4ae7a7a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,16 +10,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
10
10
### Added
11
11
-`Sentinel` creates an `*Error` without a stack trace, meant for package-level errors
12
12
-`ErrUnsupported` re-exported from the standard library
13
-
-`Error.GoString` and `MultiError.GoString` print the error in Go syntax, used by `%#v`
13
+
-`Error.GoString` and `MultiError.GoString` print the error and every contained error in Go syntax, used by `%#v`
14
14
-`MultiError.Format` implements `fmt.Formatter`: `%+v` prints every collected error with `%+v`
15
+
- Runnable examples of the error messages, fields, causes and collections
15
16
16
17
### Changed
17
18
-`Wrap`, `Newf`, `Error.Fields` and `%+v` look through single-error wrappers for inner `*Error` values: the first stack trace found is reused, fields are merged with the outermost value winning, and every cause is printed
18
-
-`Wrap` gives a stackless `*Error` the current stack trace
19
+
-`Wrap`, `Error.WithField`, `Error.WithFields` and `Error.WithCause` give a stackless `*Error` the current stack trace
19
20
-`Error.WithCause` appends to the causes instead of replacing the cause (**breaking**)
20
21
-`Error.Unwrap` returns `[]error` holding the underlying error and the causes, so `errors.Unwrap` returns nil for an `*Error` (**breaking**)
21
22
-`Error.Is` matches when the target's underlying error is in the chain of the underlying error, instead of comparing the message and fields, so fields no longer scope a match and two `New` calls with the same text no longer match (**breaking**)
22
-
-`Error.Format` honors width, precision and flags for `%s`, `%q`, `%v` and `%x`, and `%+v` prints the causes with `%+v` after the stack trace
23
+
-`Error.Format` honors width, precision and flags for `%s`, `%q`, `%v` and `%x`, and `%+v` prints the causes with `%+v` after the stack trace, each indented one level
23
24
-`Error.StackTrace` and `MultiError.Unwrap` return copies
24
25
-`MultiError.Error` indents every message with a tab and reports `no errors` for an empty collection (**breaking**)
25
26
- Methods of `Error` and `MultiError` no longer handle nil receivers (**breaking**)
@@ -29,7 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
29
30
-`MultiError.Errors`, use `MultiError.Unwrap` instead (**breaking**)
-`DataError.Unwrap` now handles nil receiver safely, preventing a panic when a typed-nil `*DataError` is passed to `errors.Unwrap`, `errors.Is`, or `errors.As`
0 commit comments