fork(16) download
  1. #include <bits/stdc++.h>
  2.  
  3. class A { public: A() {} ~A() { throw 42; } };
  4.  
  5.  
  6. int main(int argc, const char * argv[]) {
  7. try {
  8. A a;
  9. // throw 32;
  10. }
  11. catch(int a) {
  12. std::cout << a;
  13. }
  14.  
  15. return 0;
  16. }
Runtime error #stdin #stdout #stderr 0s 4808KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'int'