diff options
author | Guido van Rossum <guido@python.org> | 1991-12-16 13:05:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-12-16 13:05:50 (GMT) |
commit | b954c2c39fa7fe8cb52dc05584980a30b9d2a260 (patch) | |
tree | 9f5c4da40e6b949f6acfd1d8c4b3ab5544a50049 /Python | |
parent | aa011411fb489a8f83ee350b59446acf8ef450e7 (diff) | |
download | cpython-b954c2c39fa7fe8cb52dc05584980a30b9d2a260.zip cpython-b954c2c39fa7fe8cb52dc05584980a30b9d2a260.tar.gz cpython-b954c2c39fa7fe8cb52dc05584980a30b9d2a260.tar.bz2 |
Use SyntaxError.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/errors.c | 8 |
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; } } |