Let's catch errors in loading src/ plugins.

This commit is contained in:
Jeremy Fincher 2004-07-24 05:46:53 +00:00
parent d0552fdcf2
commit d7941fd9ac

View File

@ -218,8 +218,14 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
for s in ('Admin', 'Channel', 'Config', 'Misc', 'User'): for s in ('Admin', 'Channel', 'Config', 'Misc', 'User'):
if irc.getCallback(s) is None: if irc.getCallback(s) is None:
self.log.info('Loading %s.' % s) self.log.info('Loading %s.' % s)
m = loadPluginModule(s) try:
loadPluginClass(irc, m) m = loadPluginModule(s)
loadPluginClass(irc, m)
except Exception, e:
self.log.exception('Error loading %s:', s)
self.log.error('Error loading src/ plugin %s. '
'This is rather serious; these plugins '
'must always be loaded.', s)
self.log.info('Loading plugins/ plugins.') self.log.info('Loading plugins/ plugins.')
for (name, value) in conf.supybot.plugins.getValues(fullNames=False): for (name, value) in conf.supybot.plugins.getValues(fullNames=False):
if name.lower() == 'owner': if name.lower() == 'owner':