#include <iostream>
using namespace std;

int foo() throw();

int foo() throw() {
   throw 3;
}

int bar() {
   // do something here
   foo();
}

int main() {
   try {
      bar();
   } catch(...) {
      std::cout << "Caught";
   }
}