CJCoding With Joseph
15free / daySign inCreate account
← Back to Question List

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics:
C++ Quiz #160

A Bare throw With Nothing to Rethrow

hardExceptions

retry() executes a bare throw; while NO exception is being handled. The program compiles. What happens when it runs?

📄 Code

1#include <iostream>
2 
3void retry() {
4 throw;
5}
6 
7int main() {
8 try {
9 retry();
10 } catch (...) {
11 std::cout << "caught\n";
12 }
13 return 0;
14}