Updated error message for overflow.

This commit is contained in:
Jeremy Fincher 2003-11-17 15:55:43 +00:00
parent 76f4a8fb95
commit 47817f8ea3
1 changed files with 2 additions and 1 deletions

View File

@ -140,7 +140,8 @@ class Math(callbacks.Privmsg):
x = complex(eval(text, self._mathEnv, self._mathEnv))
irc.reply(msg, self._complexToString(x))
except OverflowError:
irc.error(msg, 'Go get scanez, this is a *real* math problem!')
maxFloat = math.ldexp(0.9999999999999999, 1024)
irc.error(msg, 'The answer exceeded %s or so.' % maxFloat)
except TypeError:
irc.error(msg, 'Something in there wasn\'t a valid number.')
except NameError, e: