Changes have been pushed for the repository "fawkes.git". (Fawkes Robotics Software Framework)
Clone: g...@git.fawkesrobotics.org:fawkes.git Gitweb: http://git.fawkesrobotics.org/fawkes.git Trac: http://trac.fawkesrobotics.org The branch, thofmann/robot-memory-fix-oplog-exception has been created at b33c33fd42f7bd90a0ccb5a0ac51350204a2ea1a (commit) http://git.fawkesrobotics.org/fawkes.git/thofmann/robot-memory-fix-oplog-exception - *Log* --------------------------------------------------------------- commit b33c33fd42f7bd90a0ccb5a0ac51350204a2ea1a Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> AuthorDate: Sat Jun 16 22:00:27 2018 -0400 Commit: Till Hofmann <hofm...@kbsg.rwth-aachen.de> CommitDate: Sat Jun 16 22:00:27 2018 -0400 robot-memory: catch an exception while reading the oplog http://git.fawkesrobotics.org/fawkes.git/commit/b33c33f http://trac.fawkesrobotics.org/changeset/b33c33f - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *Summary* ----------------------------------------------------------- - *Diffs* ------------------------------------------------------------- - *commit* b33c33fd42f7bd90a0ccb5a0ac51350204a2ea1a - - - - - - - - - - Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> Date: Sat Jun 16 22:00:27 2018 -0400 Subject: robot-memory: catch an exception while reading the oplog src/plugins/robot-memory/event_trigger_manager.cpp | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) _Diff for modified files_: diff --git a/src/plugins/robot-memory/event_trigger_manager.cpp b/src/plugins/robot-memory/event_trigger_manager.cpp index 0d6dbda..8bb759f 100644 --- a/src/plugins/robot-memory/event_trigger_manager.cpp +++ b/src/plugins/robot-memory/event_trigger_manager.cpp @@ -81,12 +81,16 @@ void EventTriggerManager::check_events() for(EventTrigger *trigger : triggers) { - while(trigger->oplog_cursor->more()) - { - BSONObj change = trigger->oplog_cursor->next(); - //logger_->log_info(name.c_str(), "Triggering: %s", change.toString().c_str()); - //actually call the callback function - trigger->callback(change); + try { + while(trigger->oplog_cursor->more()) + { + BSONObj change = trigger->oplog_cursor->next(); + //logger_->log_info(name.c_str(), "Triggering: %s", change.toString().c_str()); + //actually call the callback function + trigger->callback(change); + } + } catch (mongo::UserException &e) { + logger_->log_error(name().c_str(), "Error while reading the oplog"); } if(trigger->oplog_cursor->isDead()) { -- Fawkes Robotics Framework http://www.fawkesrobotics.org _______________________________________________ fawkes-commits mailing list fawkes-commits@lists.kbsg.rwth-aachen.de https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits