diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-02-15 22:34:31 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-02-15 22:41:14 +0300 |
commit | e8432b3c725f90eda2b880624d5408ff147d399e (patch) | |
tree | 6f7a2e23ab06e4734ffe849cb3402860277634b9 /py/stackctrl.c | |
parent | fa3b8951452ca13a807c0b6a090e0385507113db (diff) |
stackctrl: Encode "recursion depth exceeded" message as qstr.
So corresponding exception can be thrown even under tight memory conditions.
Diffstat (limited to 'py/stackctrl.c')
-rw-r--r-- | py/stackctrl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/stackctrl.c b/py/stackctrl.c index bf6a815af..7d7bbc1be 100644 --- a/py/stackctrl.c +++ b/py/stackctrl.c @@ -48,7 +48,8 @@ void mp_stack_set_limit(mp_uint_t limit) { void mp_stack_check(void) { if (mp_stack_usage() >= MP_STATE_VM(stack_limit)) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_RuntimeError, "maximum recursion depth exceeded")); + nlr_raise(mp_obj_new_exception_arg1(&mp_type_RuntimeError, + MP_OBJ_NEW_QSTR(MP_QSTR_maximum_space_recursion_space_depth_space_exceeded))); } } |