Small refacotoring of number parsing functions. Both errors are displayed when overflow and malformed number is encountered.