From bc9a68f426e15648310902f7a00cd78ad212af43 Mon Sep 17 00:00:00 2001 From: maroy Date: Mon, 10 Jan 2005 09:21:14 +0000 Subject: [PATCH] the upcoming event is canceled, if it fails initialization --- .../modules/eventScheduler/src/SchedulerThread.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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));