Mercurial > cpython-lru_cache-weakref
diff Python/errors.c @ 484:db820da3ce03 legacy-trunk
Use SyntaxError.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 16 Dec 1991 13:05:50 +0000 |
| parents | e2c3463c4d91 |
| children | fbff2e7cc49d |
line wrap: on
line diff
--- a/Python/errors.c Mon Dec 16 13:05:20 1991 +0000 +++ b/Python/errors.c Mon Dec 16 13:05:50 1991 +0000 @@ -180,10 +180,10 @@ 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_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; } }
