#include<iostream>
#include<exception>


void f() throw(int,std::bad_exception) {
  throw "niespodzianka!";
};

void unexpected_handler() {throw 3.1415926;};

main() {

  std::set_unexpected(unexpected_handler);

  try {
  f();
  }
  catch(std::bad_exception) {};
}