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 error pattern to capture and set the COM error info when crossing ABI boundaries #250

Merged
merged 5 commits into from
Sep 3, 2024

Conversation

tristanlabelle
Copy link
Owner

@tristanlabelle tristanlabelle commented Aug 31, 2024

Rename COMError to ErrorWithHResult and HResult.Error to COMError.
Rename throwIfFailed and catch to fromABI and toABI, the former capturing the error info and the latter setting it back.
Added COMError and WinRTError initializers taking a message and constructing an error info internally.

Fixes #236
Fixes #249
Fixes #254

@tristanlabelle tristanlabelle changed the title Add SwiftRestrictedErrorInfo to preserve Swift errors across WinRT boundaries Fix error pattern to capture and set the COM error info when crossing WinRT boundaries Sep 3, 2024
@tristanlabelle tristanlabelle changed the title Fix error pattern to capture and set the COM error info when crossing WinRT boundaries Fix error pattern to capture and set the COM error info when crossing ABI boundaries Sep 3, 2024
@tristanlabelle tristanlabelle enabled auto-merge (squash) September 3, 2024 09:13
@tristanlabelle tristanlabelle merged commit 571f96f into main Sep 3, 2024
4 checks passed
@tristanlabelle tristanlabelle deleted the SwiftRestrictedErrorInfo branch September 3, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant