Fixed IrcObjectProxy.finalEval to give help in the face of an empty Error exception (like that raised by privmsgs.getArgs)

This commit is contained in:
Jeremy Fincher 2003-03-28 01:17:33 +00:00
parent 406b263444
commit f97ab0d0b9

View File

@ -234,10 +234,13 @@ class IrcObjectProxy:
if callback is None:
self.args.insert(0, name)
self.reply(self.msg, '[%s]' % ' '.join(self.args))
callback.callCommand(getattr(callback, name),
self, self.msg, self.args)
command = getattr(callback, name)
callback.callCommand(command, self, self.msg, self.args)
except Error, e:
self.reply(self.msg, debug.exnToString(e))
if str(e) == '':
self.reply(self.msg, command.__doc__.splitlines()[0])
else:
self.reply(self.msg, debug.exnToString(e))
except Exception, e:
debug.recoverableException()
self.reply(self.msg, debug.exnToString(e))