]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Changed some RuntimeErrors.
authorGuido van Rossum <guido@python.org>
Mon, 16 Dec 1991 15:41:41 +0000 (15:41 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 16 Dec 1991 15:41:41 +0000 (15:41 +0000)
Python/compile.c

index 99aaf1b38471794f1931fe7d4b69842b61fb6795..08785a7ebb2a68b28f4d1685666de4ed7c4e00cd 100644 (file)
@@ -422,7 +422,8 @@ parsenumber(s)
        x = strtol(s, &end, 0);
        if (*end == '\0') {
                if (errno != 0) {
-                       err_setstr(RuntimeError, "integer constant too large");
+                       err_setstr(OverflowError,
+                                  "integer constant too large");
                        return NULL;
                }
                return newintobject(x);
@@ -431,12 +432,12 @@ parsenumber(s)
        xx = strtod(s, &end);
        if (*end == '\0') {
                if (errno != 0) {
-                       err_setstr(RuntimeError, "float constant too large");
+                       err_setstr(OverflowError, "float constant too large");
                        return NULL;
                }
                return newfloatobject(xx);
        }
-       err_setstr(RuntimeError, "bad number syntax");
+       err_setstr(SystemError, "bad number syntax?!?!");
        return NULL;
 }