From: Guido van Rossum Date: Mon, 16 Dec 1991 15:41:41 +0000 (+0000) Subject: Changed some RuntimeErrors. X-Git-Tag: v0.9.8~690 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efb087b13fca56141c7f99647c8e8a35e02f7b6c;p=thirdparty%2FPython%2Fcpython.git Changed some RuntimeErrors. --- diff --git a/Python/compile.c b/Python/compile.c index 99aaf1b38471..08785a7ebb2a 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; }