mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-21 08:01:00 +01:00
MessageParser: Log and skip current regexp on error
This commit is contained in:
parent
91accc0458
commit
850b4c3f69
@ -192,6 +192,7 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler):
|
|||||||
return
|
return
|
||||||
max_triggers = self.registryValue('maxTriggers', channel, irc.network)
|
max_triggers = self.registryValue('maxTriggers', channel, irc.network)
|
||||||
for (channel, regexp, action) in results:
|
for (channel, regexp, action) in results:
|
||||||
|
try:
|
||||||
for match in re.finditer(regexp, msg.args[1]):
|
for match in re.finditer(regexp, msg.args[1]):
|
||||||
if match is not None:
|
if match is not None:
|
||||||
thisaction = action
|
thisaction = action
|
||||||
@ -206,6 +207,8 @@ class MessageParser(callbacks.Plugin, plugins.ChannelDBHandler):
|
|||||||
break
|
break
|
||||||
if max_triggers != 0 and max_triggers == len(actions):
|
if max_triggers != 0 and max_triggers == len(actions):
|
||||||
break
|
break
|
||||||
|
except Exception:
|
||||||
|
self.log.exception('Error while handling %r', regexp)
|
||||||
|
|
||||||
|
|
||||||
for (regexp, action) in actions:
|
for (regexp, action) in actions:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user