Print stack trace upon exceptions

Useful for debugging users' logs
This commit is contained in:
moneromooo-monero 2016-03-19 21:48:36 +00:00
parent d7fb03fc97
commit fff238ec94
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
43 changed files with 259 additions and 63 deletions

View file

@ -104,7 +104,7 @@ TEST(boosted_tcp_server, worker_threads_are_exception_resistant)
// 2 theads, but 4 exceptions
ASSERT_TRUE(srv.run_server(2, false));
ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw std::runtime_error("test 1"); }));
ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw tools::runtime_error("test 1"); }));
ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw std::string("test 2"); }));
ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw "test 3"; }));
ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw 4; }));