summaryrefslogtreecommitdiffstats
path: root/Python/errors.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-12-16 13:05:50 (GMT)
committerGuido van Rossum <guido@python.org>1991-12-16 13:05:50 (GMT)
commitb954c2c39fa7fe8cb52dc05584980a30b9d2a260 (patch)
tree9f5c4da40e6b949f6acfd1d8c4b3ab5544a50049 /Python/errors.c
parentaa011411fb489a8f83ee350b59446acf8ef450e7 (diff)
downloadcpython-b954c2c39fa7fe8cb52dc05584980a30b9d2a260.zip
cpython-b954c2c39fa7fe8cb52dc05584980a30b9d2a260.tar.gz
cpython-b954c2c39fa7fe8cb52dc05584980a30b9d2a260.tar.bz2
Use SyntaxError.
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 3b7d4a1..d61af3b 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -180,10 +180,10 @@ err_input(err)
case E_OK:
break;
case E_SYNTAX:
- err_setstr(ValueError, "syntax error");
+ err_setstr(SyntaxError, "invalid syntax");
break;
case E_TOKEN:
- err_setstr(ValueError, "illegal token");
+ err_setstr(SyntaxError, "invalid token");
break;
case E_INTR:
err_set(KeyboardInterrupt);
@@ -192,10 +192,10 @@ err_input(err)
err_nomem();
break;
case E_EOF:
- err_set(EOFError);
+ err_setstr(SyntaxError, "unexpected EOF");
break;
default:
- err_setstr(SystemError, "unknown input error");
+ err_setstr(SystemError, "unknown parsing error");
break;
}
}