Last active
November 7, 2023 17:54
-
-
Save kennykerr/b765f06295622c92a1352e9deb221f5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pch.h" | |
using namespace winrt; | |
using namespace Windows::Foundation; | |
IAsyncAction Sample() | |
{ | |
throw winrt::hresult_invalid_argument(L"yolo"); | |
} | |
int main() | |
{ | |
try | |
{ | |
Sample().get(); | |
} | |
catch (winrt::hresult_error const& e) | |
{ | |
assert(e.message() == L"yolo"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment