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

Exception message doesn't propagate from an out-of-process WinRT server #1562

Open
hez2010 opened this issue Apr 6, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@hez2010
Copy link
Contributor

hez2010 commented Apr 6, 2024

Describe the bug
When calling to an out-of-process WinRT server, any exceptions from the server will become a COMException without any exception message on the client.

To Reproduce

  1. Clone https://github.com/hez2010/WinRTServer
  2. Checkout the branch eh-repro: https://github.com/hez2010/WinRTServer/tree/eh-repro
  3. Build and run

Expected behavior
The exception should contain the exception message from the server ("Exception from server").

Actual behavior
No helpful exception messages.

System.Runtime.InteropServices.COMException (0x80131500)
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|39_0(Int32 hr)
   at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
   at ABI.WinRTServer.ITestClassClassMethods.Test(IObjectReference _obj)
   at WinRTServer.TestClass.Test()
   at Program.<Main>$(String[] args)

Version Info
CsWinRT 2.0.7

Additional context

@hez2010 hez2010 added the bug Something isn't working label Apr 6, 2024
@hez2010 hez2010 changed the title Exception doesn't propagate from an out-of-process WinRT server Exception message doesn't propagate from an out-of-process WinRT server Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant