Owner: Make error message of plugin loading at startup more explicit. Closes GH-850.

This commit is contained in:
Valentin Lorentz 2014-09-14 11:08:28 +00:00
parent 44707374c0
commit e49b6fe8d2

View File

@ -190,10 +190,11 @@ class Owner(callbacks.Plugin):
except callbacks.Error as e:
# This is just an error message.
log.warning(str(e))
except (plugins.NoSuitableDatabase, ImportError) as e:
s = 'Failed to load %s: %s' % (name, e)
if not s.endswith('.'):
s += '.'
except plugins.NoSuitableDatabase as e:
s = 'Failed to load %s: no suitable database(%s).' % (name, e)
log.warning(s)
except ImportError as e:
s = 'Failed to load %s: import error (%s).' % (name, e)
log.warning(s)
except Exception as e:
log.exception('Failed to load %s:', name)