diff --git a/livesupport/modules/eventScheduler/src/SchedulerThread.cxx b/livesupport/modules/eventScheduler/src/SchedulerThread.cxx index e96c73d87..e13849ec4 100644 --- a/livesupport/modules/eventScheduler/src/SchedulerThread.cxx +++ b/livesupport/modules/eventScheduler/src/SchedulerThread.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.3 $ + Version : $Revision: 1.4 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/eventScheduler/src/SchedulerThread.cxx,v $ ------------------------------------------------------------------------------*/ @@ -95,7 +95,16 @@ SchedulerThread :: nextStep(Ptr::Ref now) throw () } if (imminent(now, nextInitTime)) { - nextEvent->initialize(); + try { + nextEvent->initialize(); + } catch (std::exception &e) { + // cancel event by getting the next event after this was + // supposed to finish + getNextEvent(nextEventEnd); + // TODO: log error + std::cerr << "event initialization error: " << e.what() + << std::endl; + } } else if (imminent(now, nextEventTime)) { Ptr::Ref timeLeft(new time_duration(*nextEventTime - *now));