# HG changeset patch # User Goffi # Date 1498066813 -7200 # Node ID 24f5a4d5f1953fdb3b15e827e1f194b8a99597cb # Parent 8be4f5769bf7b22f150dda835985762af2fa6206 core: check uncatched exceptions during plugin import and stdui init, log error and exit if any found diff -r 8be4f5769bf7 -r 24f5a4d5f195 src/core/sat_main.py --- a/src/core/sat_main.py Wed Jun 21 19:36:00 2017 +0200 +++ b/src/core/sat_main.py Wed Jun 21 19:40:13 2017 +0200 @@ -147,9 +147,14 @@ def _postMemoryInit(self, ignore): """Method called after memory initialization is done""" log.info(_("Memory initialised")) - self._import_plugins() - ui_contact_list.ContactList(self) - ui_profile_manager.ProfileManager(self) + try: + self._import_plugins() + ui_contact_list.ContactList(self) + ui_profile_manager.ProfileManager(self) + except Exception as e: + log.error(_(u"Could not initialize backend: {reason}").format( + reason = str(e).decode('utf-8', 'ignore'))) + sys.exit(1) self.initialised.callback(None) log.info(_(u"Backend is ready"))