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 de10e10
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
10
10
### Added
11
11
-`ErrUnsupported` re-exported from the standard library
12
12
-`Error.GoString` and `%#v` print the error in Go syntax
13
+
-`MultiError.Format` implements `fmt.Formatter`: `%+v` prints every collected error with its fields, stack trace and cause
13
14
14
15
### Changed
15
16
-`Error.Unwrap` returns `[]error` holding both the wrapped error and the cause, so `errors.Unwrap` now returns nil for an `*Error` (**breaking**)
16
17
-`Error.Is` matches on the underlying error identity instead of the message text, so two independent `New` calls with the same text no longer match (**breaking**)
17
18
-`Error.Is` inspects only the target itself, no longer errors wrapped by the target (**breaking**)
19
+
-`Error.Is` matches when the target's underlying error is anywhere in the chain of the inspected error's underlying error, so fields added after `Wrap` or `Newf` still scope a sentinel
20
+
-`Wrap` and `Newf` with `%w` inherit the fields, cause and stack trace of an `*Error` found in the chain instead of capturing a new stack
21
+
-`%+v` prints the stack trace before the cause
18
22
-`Error.Format` honours width, precision and flags for `%s`, `%q`, `%v` and `%x`, and prints an `*Error` cause with `%+v` including its fields and stack trace
19
23
-`MultiError.Unwrap` returns a copy of the collected errors
20
24
-`MultiError.Errors` removed in favour of `MultiError.Unwrap` (**breaking**)
@@ -27,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
27
31
-`Error.Is` no longer matches a target field holding `nil` against an error that lacks the field
28
32
-`Error.Is` no longer panics on a wrapped error of a comparable type holding an uncomparable dynamic value
29
33
-`MultiError.Error` no longer panics on a nil receiver and no longer holds the lock while formatting collected errors
34
+
-`Error.Is` no longer matches two zero-value `Error` values
0 commit comments