Handle all exception types rather than just the ones inheriting from std::exception.

This commit is contained in:
Gunnar Beutner 2012-07-23 08:57:19 +02:00
parent 1065bc168b
commit bcb1b23d9f
6 changed files with 8 additions and 8 deletions

View File

@ -69,7 +69,7 @@ public:
try {
Run();
} catch (const exception&) {
} catch (...) {
FinishException(boost::current_exception());
}
}

View File

@ -119,7 +119,7 @@ void Process::WorkerThreadProc(void)
int fd = task->GetFD();
if (fd >= 0)
tasks[fd] = task;
} catch (const exception&) {
} catch (...) {
Event::Post(boost::bind(&Process::FinishException, task, boost::current_exception()));
}

View File

@ -297,7 +297,7 @@ void Socket::ReadThreadProc(void)
if (FD_ISSET(fd, &exceptfds))
HandleException();
} catch (const exception&) {
} catch (...) {
m_Exception = boost::current_exception();
CloseInternal(false);
@ -348,7 +348,7 @@ void Socket::WriteThreadProc(void)
if (FD_ISSET(fd, &writefds))
HandleWritable();
} catch (const exception&) {
} catch (...) {
m_Exception = boost::current_exception();
CloseInternal(false);

View File

@ -39,7 +39,7 @@ void StreamLogger::OpenFile(const string& filename)
if (!stream->good())
throw_exception(runtime_error("Could not open logfile '" + filename + "'"));
} catch (const exception&) {
} catch (...) {
delete stream;
throw;
}

View File

@ -61,7 +61,7 @@ void NagiosCheckTask::ProcessFinishedHandler(NagiosCheckTask ct)
try {
pr = ct.m_Process->GetResult();
} catch (const exception&) {
} catch (...) {
ct.m_Task->FinishException(boost::current_exception());
return;
}

View File

@ -259,7 +259,7 @@ void CIBSyncComponent::RemoteObjectCommittedHandler(const Endpoint::Ptr& sender,
m_SyncingConfig = true;
object->Commit();
m_SyncingConfig = false;
} catch (const exception&) {
} catch (...) {
m_SyncingConfig = false;
throw;
}
@ -289,7 +289,7 @@ void CIBSyncComponent::RemoteObjectRemovedHandler(const RequestMessage& request)
m_SyncingConfig = true;
object->Unregister();
m_SyncingConfig = false;
} catch (const exception&) {
} catch (...) {
m_SyncingConfig = false;
throw;
}