Skip to content

Conversation

@jkoritzinsky
Copy link
Member

Implement IRestrictedErrorInfo and ILanguageExceptionErrorInfo support in cswinrt to the same level of support as in .NET today.

Implement custom HR->Exception mappings. Implement support for propagating language-specific exceptions across ABI boundaries using ILanguageExceptionErrorInfo.

Add a type mapping between Windows.Foundation.HResult and System.Exception that uses the above support to map between the two.

Do note that there's a testing hole currently around passing another projection's language-specific exception through .NET correctly and back into that projection. C++/WinRT doesn't use the language-specific exception feature of RoOriginateLanguageException, so I don't have a projection I can test against easily in our setup. I've opened an issue to add support for this to C++/WinRT at microsoft/cppwinrt#533 for parity.

Fixes #76

…s and CCW for error information interfaces. Implement mapping and wrapping/unwrapping for "language exceptions" that can be called at ABI boundaries.
…d boundary to verify that we correctly propagate the exception through the native section via WinRT's error handling.
@Scottj1s Scottj1s requested a review from manodasanW February 26, 2020 01:41
@Scottj1s
Copy link
Member

@manodasanW - would you mind reviewing the bits in WinRT.cs, since error origination has some dark corners?

@Scottj1s Scottj1s merged commit 579d362 into master Feb 26, 2020
@jkoritzinsky jkoritzinsky deleted the jkoritzinsky/error-handling branch March 16, 2020 21:23
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.

Add support for IRestrictedErrorInfo

3 participants