Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stacktrace the culprit should be the received error not the cause (#45)
Previously, when stacktrace was enabled, the culprit would be set to the first error that did not implement Cause (as detected by errors.Cause(err)), this had the affect of not showing any additional context added to the error. This was also inconsistent with the same behaviour when stacktrace was disabled. This change attempts to unify that behaviour, as well as to not discard the context added to the errors.
- Loading branch information