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

C++/WinRT support for non-WinRT error information #582

Merged
merged 2 commits into from
Sep 16, 2019

Conversation

kennykerr
Copy link
Contributor

Fixes #580

C++/WinRT assumes error information is propagated using WinRT error origination APIs. This update ensures that APIs that only use the older IErrorInfo interface for error reporting still get their error messages reported by C++/WinRT.

info->GetDescription(legacy.put());
}

hstring message;
Copy link
Member

Choose a reason for hiding this comment

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

Consider if you get want to append GetGuid / GetSource to the message. Not sure how often they are used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rarely in my experience, and then I'd have to worry about how to format it. 😨

@kennykerr kennykerr merged commit 60a9a25 into master Sep 16, 2019
@kennykerr kennykerr deleted the kennykerr-error-info branch September 16, 2019 16:21
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.

C++/WinRT hresult_error struct loses error message
3 participants