mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
SedRegex: Log error exceptions from the replacer.
This commit is contained in:
parent
8ed0b95962
commit
0e2b0a96c8
@ -119,7 +119,7 @@ class SedRegex(callbacks.PluginRegexp):
|
|||||||
try:
|
try:
|
||||||
(pattern, replacement, count, flags) = self._unpack_sed(msg.args[1])
|
(pattern, replacement, count, flags) = self._unpack_sed(msg.args[1])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.warning(_("SedRegex error: %s"), e, exc_info=True)
|
self.log.warning(_("SedRegex parser error: %s"), e, exc_info=True)
|
||||||
if self.registryValue('displayErrors', msg.channel, irc.network):
|
if self.registryValue('displayErrors', msg.channel, irc.network):
|
||||||
irc.error('%s.%s: %s' % (e.__class__.__module__, e.__class__.__name__, e))
|
irc.error('%s.%s: %s' % (e.__class__.__module__, e.__class__.__name__, e))
|
||||||
return
|
return
|
||||||
@ -143,6 +143,7 @@ class SedRegex(callbacks.PluginRegexp):
|
|||||||
irc.error(_("Search not found in the last %i messages.") %
|
irc.error(_("Search not found in the last %i messages.") %
|
||||||
len(irc.state.history))
|
len(irc.state.history))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
self.log.warning(_("SedRegex replacer error: %s"), e, exc_info=True)
|
||||||
if self.registryValue('displayErrors', msg.channel, irc.network):
|
if self.registryValue('displayErrors', msg.channel, irc.network):
|
||||||
irc.error('%s.%s: %s' % (e.__class__.__module__,
|
irc.error('%s.%s: %s' % (e.__class__.__module__,
|
||||||
e.__class__.__name__, e))
|
e.__class__.__name__, e))
|
||||||
|
Loading…
Reference in New Issue
Block a user