diff options
| author | Gordon Sim <gsim@apache.org> | 2011-04-05 10:05:33 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2011-04-05 10:05:33 +0000 |
| commit | 535dc35ba4925ef25e407cbb26cb869ddcb1a62c (patch) | |
| tree | d85f26b539cb0dfb96226d746c6331c1cdcb12e3 /cpp/src | |
| parent | 43d7e82004f28009084ac3e111dabedceba0a8e0 (diff) | |
| download | qpid-python-535dc35ba4925ef25e407cbb26cb869ddcb1a62c.tar.gz | |
QPID-3187: Added exception handling safeguard for timer tasks
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1088951 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/sys/Timer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/Timer.cpp b/cpp/src/qpid/sys/Timer.cpp index 85e410860d..fdb2e8c6bb 100644 --- a/cpp/src/qpid/sys/Timer.cpp +++ b/cpp/src/qpid/sys/Timer.cpp @@ -185,7 +185,11 @@ void Timer::stop() // Allow subclasses to override behavior when firing a task. void Timer::fire(boost::intrusive_ptr<TimerTask> t) { - t->fireTask(); + try { + t->fireTask(); + } catch (const std::exception& e) { + QPID_LOG(error, "Exception thrown by timer task " << t->getName() << ": " << e.what()); + } } // Provided for subclasses: called when a task is droped. |
