summaryrefslogtreecommitdiff
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-07-03 01:04:23 -0400
committerYury Selivanov <yselivanov@sprymix.com>2015-07-03 01:04:23 -0400
commitf488fb422a641aa7c38eb63c09f459e4baff7bc4 (patch)
treef09d64f919af622c0ebf28adb9a3bfec567e47c8 /Python/symtable.c
parent27be130ec71fa95e2496bd9e42505aa6c7457682 (diff)
downloadcpython-git-f488fb422a641aa7c38eb63c09f459e4baff7bc4.tar.gz
Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 3677e59748..354b799678 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);
}