Commit c4c5a68f authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

DiscovererWorker: Don't let exception yield out of the discoverer thread

parent 4d49a999
......@@ -112,8 +112,16 @@ void DiscovererWorker::run()
for ( auto& d : m_discoverers )
{
// Assume only one discoverer can handle an entrypoint.
if ( d->discover( entryPoint ) == true )
break;
try
{
if ( d->discover( entryPoint ) == true )
break;
}
catch(std::exception& ex)
{
LOG_ERROR( "Fatal error while discovering ", entryPoint, ": ", ex.what() );
}
if ( m_run == false )
break;
}
......@@ -126,7 +134,14 @@ void DiscovererWorker::run()
m_cb->onReloadStarted();
for ( auto& d : m_discoverers )
{
d->reload();
try
{
d->reload();
}
catch(std::exception& ex)
{
LOG_ERROR( "Fatal error while reloading: ", ex.what() );
}
if ( m_run == false )
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment