Commits

wodny committed 249f251

Catch all exceptions in dispatch, log error.

  • Participants
  • Parent commits 9e43772
  • Branches exception-proof

Comments (0)

Files changed (1)

File lib/dispatch.py

         logging.debug(_("Entering dispatch loop..."))
         order = self.events_out.get()
         while order is not None:
-            order.handle(self)
+            logging.debug("Order: {0}".format(order))
+            try:
+                order.handle(self)
+            except Exception as e:
+                logging.error("Exception caught in dispatch loop.")
+                logging.error("Exception {0}: {1}".format(type(e), e))
             order = self.events_out.get()
 
         logging.debug(_("Exited dispatch loop."))