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

Allow error to be wrapped #4689

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Allow error to be wrapped #4689

wants to merge 1 commit into from

Conversation

yeasy
Copy link
Member

@yeasy yeasy commented Feb 20, 2024

Change-Id: I3620094d9aece9151bf5dd08005673c2610aa041

Type of change

  • Improvement (improvement to code, performance, etc)

Description

Change output fmt from %s to %w, which is supported by errors and fmt
to wrap error.

Additional details

N/A

Related issues

N/A

Release Note

N/A

Change output fmt from %s to %w, which is supported by errors and fmt to
wrap error.

Change-Id: I3620094d9aece9151bf5dd08005673c2610aa041
Signed-off-by: Baohua Yang <yangbaohua@gmail.com>
Signed-off-by: Baohua Yang <baohua.yang@oracle.com>
@yeasy yeasy requested a review from a team as a code owner February 20, 2024 16:16
@denyeart
Copy link
Contributor

My opinion is that we shouldn't be changing error handling as a series of one-off pull requests. In this case the caller of the function doesn't have any need to unwrap the error so I'm not understanding how wrapping adds value here.

If you think there is value in changing error handling practices in general, let's have that discussion in the error handling issue and come up with an overall plan for rolling the changes into the codebase. This should include discussion of how callers should be updated to take advantage of new proposed practices.

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.

None yet

2 participants