#include <iostream>
#include <memory>
#include <stdexcept>

void g() {
  throw std::runtime_error(std::string("Bum!"));
}

void f() {
  try {	
    std::unique_ptr<int> p(new int(7));
    std::cout << *(static_cast<int*>(p.get())) << std::endl;
    g();
  } catch(std::runtime_error &e) {
  	std::cout << e.what() << "\n";
  } catch(...) {
  	std::cout << "Случилось страшное!\n";
  }
}

int main() {
  f();
  return 0;
}