fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class MyClass{
  5. public:
  6. ~MyClass() throw(int) { throw 0;}
  7. };
  8.  
  9. int main() {
  10. try {
  11. MyClass m;
  12. throw 1;
  13. }
  14. catch(...)
  15. {
  16. std::cout<<"Exception catched"<<endl;
  17. }
  18. return 0;
  19. }
Runtime error #stdin #stdout #stderr 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
terminate called after throwing an instance of 'int'