Skip to content

[5.9] improve string interpolation of errors #6488

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

Merged
merged 1 commit into from
May 1, 2023

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Apr 26, 2023

5.9 cherry pick of #6482

motivation: better error messages

changes:
* audit usage of "\(error)" and replace them with "\(error.interpolationDescription)"
* add ADPI to pass an optional underlying error to observability's debug, info and warn calls such that it automatically interpolates the error correctly
* update call sites

rdar://108418554
@tomerd tomerd added the swift 5.9 This PR targets the 5.9 branch label Apr 26, 2023
@tomerd
Copy link
Contributor Author

tomerd commented Apr 26, 2023

@swift-ci smoke test

@tomerd tomerd added the next waiting for next merge window label Apr 26, 2023
@tomerd
Copy link
Contributor Author

tomerd commented Apr 27, 2023

@swift-ci smoke test macOS

@tomerd tomerd merged commit d30259e into swiftlang:release/5.9 May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next waiting for next merge window swift 5.9 This PR targets the 5.9 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants