ExceptionInd: Remove duplicate invocations
This commit is contained in:
@@ -108,24 +108,26 @@ void ComponentThread::main(ComponentThread& self)
|
||||
*/
|
||||
for (self.keepLooping = true; self.keepLooping;)
|
||||
{
|
||||
bool sendExceptionInd = false;
|
||||
|
||||
try {
|
||||
self.getIoService().reset();
|
||||
self.getIoService().run();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
sendExceptionInd = true;
|
||||
std::cerr << self.name << ":" << __func__
|
||||
<< ": Exception occurred: " << e.what() << "\n";
|
||||
|
||||
mrntt::mrntt->exceptionInd(self);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
sendExceptionInd = true;
|
||||
std::cerr << self.name << ":" << __func__
|
||||
<< ": Unknown exception occurred" << "\n";
|
||||
|
||||
mrntt::mrntt->exceptionInd(self);
|
||||
}
|
||||
|
||||
if (sendExceptionInd) { mrntt::mrntt->exceptionInd(self); }
|
||||
}
|
||||
|
||||
std::cout << self.name << ":" << __func__ << ": Exited event loop" << "\n";
|
||||
|
||||
@@ -106,20 +106,25 @@ void ComponentThread::marionetteMain(ComponentThread& self)
|
||||
*/
|
||||
for (self.keepLooping = true; self.keepLooping;)
|
||||
{
|
||||
bool sendExceptionInd = false;
|
||||
try {
|
||||
self.getIoService().reset();
|
||||
self.getIoService().run();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
sendExceptionInd = true;
|
||||
std::cerr << self.name << ":" << __func__
|
||||
<< ": Exception occurred: " << e.what() << "\n";
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
sendExceptionInd = true;
|
||||
std::cerr << self.name << ":" << __func__
|
||||
<< ": Unknown exception occurred" << "\n";
|
||||
}
|
||||
|
||||
if (sendExceptionInd) { self.exceptionInd(self); }
|
||||
}
|
||||
|
||||
std::cout << __func__ << ": Exited event loop" << "\n";
|
||||
|
||||
Reference in New Issue
Block a user