summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-07-03 05:10:11 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-07-03 05:10:11 (GMT)
commitbb215e23004af8e8105fae4e132a63b0c25ea47c (patch)
tree1e0023f5f39b23e58178ffeb992ac5e2264ff1e9 /Python
parent1c5e5a89b4bc1a7b9dbd0375fbd76dfdadcb8605 (diff)
parentf488fb422a641aa7c38eb63c09f459e4baff7bc4 (diff)
downloadcpython-bb215e23004af8e8105fae4e132a63b0c25ea47c.zip
cpython-bb215e23004af8e8105fae4e132a63b0c25ea47c.tar.gz
cpython-bb215e23004af8e8105fae4e132a63b0c25ea47c.tar.bz2
Merge 3.5 (Issue #19235)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c2
-rw-r--r--Python/errors.c2
-rw-r--r--Python/symtable.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 12df0fe..e68ae33 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -737,7 +737,7 @@ _Py_CheckRecursiveCall(const char *where)
if (tstate->recursion_depth > recursion_limit) {
--tstate->recursion_depth;
tstate->overflowed = 1;
- PyErr_Format(PyExc_RuntimeError,
+ PyErr_Format(PyExc_RecursionError,
"maximum recursion depth exceeded%s",
where);
return -1;
diff --git a/Python/errors.c b/Python/errors.c
index 1172c59..aed2bdc 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -319,7 +319,7 @@ finally:
Py_DECREF(*exc);
Py_DECREF(*val);
/* ... and use the recursion error instead */
- *exc = PyExc_RuntimeError;
+ *exc = PyExc_RecursionError;
*val = PyExc_RecursionErrorInst;
Py_INCREF(*exc);
Py_INCREF(*val);
diff --git a/Python/symtable.c b/Python/symtable.c
index 3677e59..354b799 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -1135,7 +1135,7 @@ static int
symtable_visit_stmt(struct symtable *st, stmt_ty s)
{
if (++st->recursion_depth > st->recursion_limit) {
- PyErr_SetString(PyExc_RuntimeError,
+ PyErr_SetString(PyExc_RecursionError,
"maximum recursion depth exceeded during compilation");
VISIT_QUIT(st, 0);
}
@@ -1357,7 +1357,7 @@ static int
symtable_visit_expr(struct symtable *st, expr_ty e)
{
if (++st->recursion_depth > st->recursion_limit) {
- PyErr_SetString(PyExc_RuntimeError,
+ PyErr_SetString(PyExc_RecursionError,
"maximum recursion depth exceeded during compilation");
VISIT_QUIT(st, 0);
}