fork download
  1. #include <iostream>
  2.  
  3. void SomeFunc() try
  4. {
  5. {
  6. throw "Some error";
  7. }
  8. }
  9. catch(const char* error)
  10. {
  11. std::cout << "Exception: \'" << error << "\' is occured in " << __FUNCTION__ << std::endl;
  12. }
  13.  
  14. int main()
  15. {
  16. SomeFunc();
  17. // your code goes here
  18. return 0;
  19. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
Exception: 'Some error' is occured in SomeFunc