Skip to content

passing non error HRESULT to winrt::throw_hresult results in an assert, should this be made easier to diagnose? #680

@ChrisGuzak

Description

@ChrisGuzak

I was testing error diagnoseability and mis-wrote my test

        winrt::throw_hresult(ERROR_INVALID_STATE);

should have been

        winrt::throw_hresult(HRESULT_FROM_WIN32(ERROR_INVALID_STATE));

Rightly, this triggered an assert, but it took me a while to figure out I was to blame. A comment suggesting this possibility would have caught my attention.

Is this worth addressing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions