fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a = 3;
  5.  
  6. try
  7. {
  8. if (a < 5)
  9. throw "error";
  10. }
  11. catch (...)
  12. {
  13. printf ("captured\n");
  14. }
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.02s 2812KB
stdin
Standard input is empty
stdout
captured