VS community 2022 doesn't like "throw invalid_argument'; seems to work with CLION

Typing example in class 3, section 6, about 4:03. “throw invalid_argument” in the example code, when entered into VS community 2022, compiles OK but then throws “Exception Unhandled” and provides a gnarly memory address.

I am not sure if this is normal behavior (I see an exception in VSC2022, and we are saying “throw an exception”)–but it is not friendly looking CLION console as in the video

…or if I have done something wrong?

I have very carefully duplicated the example code.

When I look at examples of throw invalid_argument in Viz studio forums, the syntax seems to be part of “try/catch” a lot like you’d see in Powershell and not what is in the instructional video.

Anyone know what I am doing wrong? Or is this expected behavior?

Thank you in advance!