← Back to Question List
C++ Quiz #160
A Bare throw With Nothing to Rethrow
retry() executes a bare throw; while NO exception is being handled. The program compiles. What happens when it runs?
📄 Code
1#include <iostream>23void retry() {4 throw;5}67int main() {8 try {9 retry();10 } catch (...) {11 std::cout << "caught\n";12 }13 return 0;14}