#include void funk(int it) { try { throw it; } catch(int whatever) { std::cout << "I caught a " << whatever << std::endl; } } int main() { for (auto up = 1; up <= 5; up++) { try { throw up; } catch(int z) { std::cout << "You threw me a " << z << std::endl; } } for (auto i = 16; i <= 20; i++) funk(i); std::cout << "End of program\n"; }