summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-12-16 15:41:41 (GMT)
committerGuido van Rossum <guido@python.org>1991-12-16 15:41:41 (GMT)
commitefb087b13fca56141c7f99647c8e8a35e02f7b6c (patch)
tree51d33e4d2466374bbebe2cd5784f997761c0307d
parent7610599756b495246fe658b254e040b154d5d248 (diff)
downloadcpython-efb087b13fca56141c7f99647c8e8a35e02f7b6c.zip
cpython-efb087b13fca56141c7f99647c8e8a35e02f7b6c.tar.gz
cpython-efb087b13fca56141c7f99647c8e8a35e02f7b6c.tar.bz2
Changed some RuntimeErrors.
-rw-r--r--Python/compile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 99aaf1b..08785a7 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -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;
}