core: check uncatched exceptions during plugin import and stdui init, log error and exit if any found
This commit is contained in:
parent
0b1b687ca3
commit
e30f22ec4c
1 changed files with 8 additions and 3 deletions
|
|
@ -147,9 +147,14 @@ class SAT(service.Service):
|
|||
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"))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue