mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Updated error message for overflow.
This commit is contained in:
parent
76f4a8fb95
commit
47817f8ea3
@ -140,7 +140,8 @@ class Math(callbacks.Privmsg):
|
|||||||
x = complex(eval(text, self._mathEnv, self._mathEnv))
|
x = complex(eval(text, self._mathEnv, self._mathEnv))
|
||||||
irc.reply(msg, self._complexToString(x))
|
irc.reply(msg, self._complexToString(x))
|
||||||
except OverflowError:
|
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:
|
except TypeError:
|
||||||
irc.error(msg, 'Something in there wasn\'t a valid number.')
|
irc.error(msg, 'Something in there wasn\'t a valid number.')
|
||||||
except NameError, e:
|
except NameError, e:
|
||||||
|
Loading…
Reference in New Issue
Block a user