diff Python/compile.c @ 493:57667ab1e194 legacy-trunk

Changed some RuntimeErrors.
author Guido van Rossum <guido@python.org>
date Mon, 16 Dec 1991 15:41:41 +0000
parents ee899a81570d
children d0baa8300005
line wrap: on
line diff
--- a/Python/compile.c	Mon Dec 16 13:10:58 1991 +0000
+++ b/Python/compile.c	Mon Dec 16 15:41:41 1991 +0000
@@ -422,7 +422,8 @@
 	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 @@
 	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;
 }