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

Preserve the IRestrictedErrorInfo after reading it. #154

Closed
wants to merge 4 commits into from

Conversation

tristanlabelle
Copy link
Contributor

@tristanlabelle tristanlabelle commented Apr 3, 2024

For crash reporting purposes, it is useful to keep the error state, so a crash handler can call GetErrorInfo.

@tristanlabelle tristanlabelle marked this pull request as ready for review April 3, 2024 19:15
@tristanlabelle tristanlabelle requested a review from a team as a code owner April 3, 2024 19:15
Copy link
Collaborator

@stevenbrix stevenbrix left a comment

Choose a reason for hiding this comment

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

as-is, this will only provide information for RoOriginateError, which doesn't account for all possible errors. we should store the error info or see if RoGetMatchingRestrictedErrorInfo does the trick

@tristanlabelle
Copy link
Contributor Author

Abandoning since we found a better solution in our scenario (detouring swift_unexpectedError).

The WinRT error handling model is that the projection should retrieve and clear the IRestrictedErrorInfo, and then propagate that using the language's error mechanism as necessary. RoOriginateError is meant only to attach additional information to the HRESULT as it transitions out of the WinRT component and into the projection, not as a log of the last recorded error.

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