diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 19:26:36 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-12-18 19:26:36 (GMT) |
commit | 5b89840d9cf11014a4b865d79497649f74bf2866 (patch) | |
tree | d3ff6d2bce57a9f4b89356c0519b2d6eb9cda7ad /Modules/parsermodule.c | |
parent | e2303f8970ee6f30d3781ad31f76530d135a57b5 (diff) | |
parent | 737fb89dd15e4db6ef30d25963e774ae09cc49dc (diff) | |
download | cpython-5b89840d9cf11014a4b865d79497649f74bf2866.zip cpython-5b89840d9cf11014a4b865d79497649f74bf2866.tar.gz cpython-5b89840d9cf11014a4b865d79497649f74bf2866.tar.bz2 |
Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r-- | Modules/parsermodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index b4602f5..fea603e 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -696,7 +696,7 @@ parser_tuple2st(PyST_Object *self, PyObject *args, PyObject *kw) err_string("parse tree does not use a valid start symbol"); } } - /* Make sure we throw an exception on all errors. We should never + /* Make sure we raise an exception on all errors. We should never * get this, but we'd do well to be sure something is done. */ if (st == NULL && !PyErr_Occurred()) @@ -802,7 +802,7 @@ build_node_children(PyObject *tuple, node *root, int *line_num) else if (!ISNONTERMINAL(type)) { /* * It has to be one or the other; this is an error. - * Throw an exception. + * Raise an exception. */ PyObject *err = Py_BuildValue("os", elem, "unknown node type."); PyErr_SetObject(parser_error, err); @@ -854,7 +854,7 @@ build_node_tree(PyObject *tuple) if (ISTERMINAL(num)) { /* * The tuple is simple, but it doesn't start with a start symbol. - * Throw an exception now and be done with it. + * Raise an exception now and be done with it. */ tuple = Py_BuildValue("os", tuple, "Illegal syntax-tree; cannot start with terminal symbol."); |