fork download
  1. #include <iostream>
  2. #include <exception> //terminate()
  3. #include <cstdlib>
  4.  
  5. using namespace std;
  6.  
  7. void error(){
  8. cerr << "error. Not perehvat" << endl;
  9. };
  10.  
  11. int main(void) {
  12. set_terminate(error);
  13. throw 5;
  14. }
  15.  
Runtime error #stdin #stdout #stderr 0s 3268KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
error. Not perehvat