Commits

Marcin Kasperski committed ed32753

Much better diagnostics in case of unhandled errors

  • Participants
  • Parent commits 0e4220d

Comments (0)

Files changed (1)

src/mekk/fics/fics_connector.py

             + traceback.format_exc(e))
             reactor.stop()
 
-    def on_unhandled_processing_failure(self, err):
+    def on_unhandled_processing_failure(self, failure):
         """
         Called on unhandled errors.
         """
+        logger_lib.fatal(
+            "%s: Unhandled error, stopping program." % self.label,
+            exc_info=(
+                failure.type,
+                failure.value,
+                failure.getTracebackObject()))
         #TODO: delegate to client so the user code can recover from this failure
-        logger_lib.error("%s: Unhandled error, bailing out. Error details:\n%s" % (self.label, err))
+        #logger_lib.error("%s: Unhandled error, stopping program. Error details:\n%s" % (
+        #    self.label, err))
         reactor.stop()
 
     def on_command_timeout(self):