Use throw rather than abort() for guid parse failures#992
Use throw rather than abort() for guid parse failures#992jlaanstra merged 4 commits intomicrosoft:masterfrom
Conversation
Make `winrt::guid("...")` more useful at runtime by throwing on failure instead of aborting the program.
|
@kennykerr does a successful run of "C++ for WinRT Xlang Internal Build" include the Clang validation you were asking for? |
kennykerr
left a comment
There was a problem hiding this comment.
Thanks! Please add a test that verifies this works. At a glance, this won't compile.
|
Yes, you can either validate it locally or run the build once a test has been added. |
|
Oh and the CI build for some reason will only run branches local to this repo. |
|
Does the test infrastructure have any existing support for compile-time negative tests (i.e. code that's expected to not compile)? I can certainly add compile-time and runtime positive tests, as well as a runtime negative test, but I'm not going to bite off setting up test infrastructure for compile-time negative tests if that's not already available... |
|
No negative testing unfortunately. Just need a test that validates it works in a constant expression (e.g. |
|
@kennykerr I'm not sure how to trigger the "C++ for WinRT Xlang internal build" pipeline run that's required by policy... Is this even possible, since my changes are coming from a different fork? I don't think I have permission to create a branch in the official microsoft fork. |
|
I've given you Write access so you should be able to push a branch. Then you can go here and build your branch: https://dev.azure.com/microsoft/Dart/_build?definitionId=31784 |
|
Verified offline that Clang works with these changes too. @kennykerr any additional changes needed, or is this ready to merge? |
|
Thanks for approving the changes, @kennykerr! Looks like I'm not authorized to merge, so you may need to complete this PR yourself... |
|
@DefaultRyan or @jlaanstra can you help? I'm on the beach. 😎 |
Make
winrt::guid("...")more useful at runtime by throwing on failure instead of aborting the program. See #991