CsWinRT
CsWinRT copied to clipboard
Exception message thrown by WinRT object is not preserved by C#/WinRT
Click the button in these two repro apps to see the issue:
ColorPickerExceptionMessageUWP.zip
ColorPickerExceptionMessageDesktop.zip
In the UWP application, which does not use C#/WinRT projections, setting ColorPicker.MaxHue to an invalid value causes an ArgumentException to be thrown that gives the specific information that the value must be between 0 and 359. In the desktop application, which does use C#/WinRT projections, the ArgumentException is still thrown, but the specific error message is lost - all we get is the default ArgumentException error message.
Issue looks to be we store the restricted error info message in the data dictionary and not actually use it for the message. Looking for a way to set it.
fixed by #1228 App.UnhandledException fix will be available in Windows App SDK 1.2 Preview 2