KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Consider the following C++ code: try { throw foo(1); } catch (foo &err) { throw bar(2); } catch (bar &err) { // Will throw of bar(2) be caught here? } I would expect the answer is no since it is not inside the try block and I see in another question the answer is no for Java, but want to confirm C++ is also no. Yes, I can run a test program, but I'd like to know the language definition of the behavior in the remote case that my compiler has a bug.
Tags (comma-separated)
Save Edits
Cancel