Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions match_wrapped_error_matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ func (matcher *MatchWrappedErrorMatcher) Match(actual interface{}) (bool, error)
return success, err
}

_, expectedCauserOk := matcher.Expected.(Causer)
_, expectedCauserOK := matcher.Expected.(Causer)
_, actualCauserOK := actual.(Causer)

// XOR, one of them is a wrapped error and the other isn't
if expectedCauserOk != actualCauserOK {
if expectedCauserOK != actualCauserOK {
underlyingExpected := unwindError(expectedErr)
underlyingActual := unwindError(actualErr)
return matchError(underlyingExpected, underlyingActual)
Expand Down