Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: consistent handling of nil passed to any wrapping function #4

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

e-sumin
Copy link
Collaborator

@e-sumin e-sumin commented Mar 19, 2024

Currently, the Wrap function required the error passed to be not nil, which was not consistent with the WithStack and WithCause functions.

This PR fixes that, and now all three functions return nil if nil is passed.

@e-sumin e-sumin force-pushed the fix/consistent-nil-wrapping branch from d8f49f4 to 5ea0bbc Compare March 19, 2024 10:26
Copy link

@hairyhum hairyhum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we document it somewhere?

@e-sumin
Copy link
Collaborator Author

e-sumin commented Mar 20, 2024

Can we document it somewhere?

Done

@e-sumin e-sumin merged commit 724240f into main Mar 20, 2024
2 checks passed
@e-sumin e-sumin deleted the fix/consistent-nil-wrapping branch March 20, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants