Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. std::thread t(foo); //foo is just a function that prints a message
  2.  
  3. try
  4. {
  5. //std::this_thread::sleep_for(std::chrono::seconds(1));
  6. throw std::exception();
  7. }
  8. catch (const std::exception& e)
  9. {
  10. std::cout << ".join after exception !n";
  11. t.join();
  12. }
  13. std::cout << ".join in main() !n";
  14. //t.join()
  15.  
  16. ---------------------------
  17. Microsoft Visual C++ Runtime Library
  18. ---------------------------
  19. Debug Error!
  20.  
  21. Program: ...al studio 2013ProjectsCPP_nonexceptDebugCPP_nonexcept.exe
  22.  
  23. R6010
  24.  
  25. - abort() has been called
  26.  
  27. try
  28. {
  29. throw std::exception();
  30. }
  31. catch (const std::exception& e)
  32. {
  33. ....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement