stackctrl: Encode "recursion depth exceeded" message as qstr.

So corresponding exception can be thrown even under tight memory conditions.
This commit is contained in:
Paul Sokolovsky
2015-02-15 22:34:31 +03:00
parent fa3b895145
commit e8432b3c72
2 changed files with 3 additions and 1 deletions

View File

@@ -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)));
}
}