diff --git a/src/ripple/app/main/BasicApp.cpp b/src/ripple/app/main/BasicApp.cpp index a728e0da0..5a25fdbaa 100644 --- a/src/ripple/app/main/BasicApp.cpp +++ b/src/ripple/app/main/BasicApp.cpp @@ -20,6 +20,7 @@ #include #include #include +#include BasicApp::BasicApp(std::size_t numberOfThreads) { @@ -27,11 +28,15 @@ BasicApp::BasicApp(std::size_t numberOfThreads) threads_.reserve(numberOfThreads); while(numberOfThreads--) threads_.emplace_back( - [this, numberOfThreads](){ + [this, numberOfThreads]() + { beast::Thread::setCurrentThreadName( std::string("io_service #") + std::to_string(numberOfThreads)); - this->io_service_.run(); + + ripple::reportUncaughtException (&io_service_, + &boost::asio::io_service::run, + "io_service::run"); }); }