I'm in Visual Studio playing around with the following code.
When doStuff() throws 2, what is the vanilla way of handling the exception?
I thought the way it works is that it simply exits the program. In visual studio, however, I'm given two options.
1.) Break - which I think basically means exit the program 2.) Continue - which I think basically means just exit the try block.
So if I'm on linux, or not in debugging mode. Which one of the two will my program do?
That break/continue popup means Visual Studio encountered an unhandled exception.
You have an unhandled exception because you don't have a catch block matching the type of the exception thrown. Line 4, you're throwing an int. Line 16: you have a catch block that is expecting a constchar *.