1 #include <cstdio> 2 #include <exception> 3 4 int foo(void); 5 main(void)6int main(void) 7 { 8 try { 9 (void) foo(); 10 } 11 // Catch all exceptions. Note that if we used catch (std::exception& e) 12 // instead, we would need to activate rtti as well to avoid crashing 13 // in the C++ runtime. 14 catch (...) { 15 ::printf(" World!\n"); 16 } 17 return 0; 18 }