locked
WinRTComponent How do I get the custom message out of a WinRTError

    Question

  • The Platform::Exception classes all accept an additional parameter for the message.

    throw ref new Platform::COMException(HRESULT_FROM_WIN32(ERROR_NO_SUCH_USER), "Username: " + userName);

    How do I get this information from JS out of an WinRTError? I thought this has been solved in 8.1, where at least the debugger displayed this custom message?


    • Edited by pkursawe Friday, August 22, 2014 10:24 AM
    Friday, August 22, 2014 10:24 AM

All replies

  • Which information are you trying to get?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, August 25, 2014 4:20 PM
    Moderator
  • This information:

    throw ref new Platform::COMException(HRESULT_FROM_WIN32(ERROR_NO_SUCH_USER), "Username: " + userName);

    Monday, August 25, 2014 10:06 PM