mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Added a little extra error catching in irclib.Irc.takeMsg.
This commit is contained in:
parent
19e9d86a7c
commit
03e3ad47a0
@ -524,7 +524,14 @@ class Irc(IrcCommandDispatcher):
|
|||||||
# matter. That's why we gotta go munging in private attributes
|
# matter. That's why we gotta go munging in private attributes
|
||||||
msg._str = msg._str[:500] + '\r\n'
|
msg._str = msg._str[:500] + '\r\n'
|
||||||
msg._len = len(str(msg))
|
msg._len = len(str(msg))
|
||||||
self.state.addMsg(self, msg)
|
try:
|
||||||
|
self.state.addMsg(self, msg)
|
||||||
|
except Exception, e:
|
||||||
|
log.exception('Uncaught exception in IrcState.addMsg. This '
|
||||||
|
'could be a bug, but it could also be the '
|
||||||
|
'result of an invalid message being sent via '
|
||||||
|
'Owner.ircquote.')
|
||||||
|
return
|
||||||
log.debug('Outgoing message: ' + str(msg).rstrip('\r\n'))
|
log.debug('Outgoing message: ' + str(msg).rstrip('\r\n'))
|
||||||
return msg
|
return msg
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user