diff --git a/beast/unit_test/thread.h b/beast/unit_test/thread.h index fb1fc50cc5..90e6fb3d2b 100644 --- a/beast/unit_test/thread.h +++ b/beast/unit_test/thread.h @@ -94,6 +94,12 @@ public: s_->propagate_abort(); } + void + detach() + { + t_.detach(); + } + void swap (thread& other) { @@ -112,6 +118,15 @@ private: catch (suite::abort_exception const&) { } + catch (std::exception const& e) + { + s_->fail ("unhandled exception: " + + std::string (e.what())); + } + catch (...) + { + s_->fail ("unhandled exception"); + } } };