1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
/**
* Contact: philipp.rescheneder@gmail.com
*/
#include "NGM.h"
#include "Log.h"
void NGMTask::FinishStage()
{
if (!m_FinishedStage)
{
NGM.FinishStage(m_TID);
m_FinishedStage = true;
}
}
void NGMTask::Run() {
m_FinishedStage = false;
try {
DoRun();
} catch (std::bad_alloc & ex) {
Log.Error("Exception bad_alloc occurred in thread %i. This usually means you ran out of physical or virtual memory (try ulimit -v)", m_TID);
}
catch (...)
{
Log.Error("Exception in thread %i", m_TID);
throw;
}
}
|