Skip to content

C++/WinRT now handles failing async/event delegates the same way that WRL does#435

Merged
kennykerr merged 2 commits into
masterfrom
kennykerr-invoke
May 28, 2019
Merged

C++/WinRT now handles failing async/event delegates the same way that WRL does#435
kennykerr merged 2 commits into
masterfrom
kennykerr-invoke

Conversation

@kennykerr

Copy link
Copy Markdown
Contributor

Fixes #409

catch (...)
{
int32_t const code = to_hresult();
WINRT_RoTransformError(code, 0, nullptr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are we adding RoTransformError here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This adds telemetry so that instead of the error info simply disappearing when the exception is destroyed (and the ref count reaches zero), there is an event indicating that the error was transformed explicitly.

@kennykerr kennykerr merged commit bac1782 into master May 28, 2019
@kennykerr kennykerr deleted the kennykerr-invoke branch May 28, 2019 22:01
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 should handle disconnected async completion handlers much like it does event handlers

2 participants