diff options
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index 457266c67f..5fd053e1a2 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -1456,3 +1456,10 @@ NORETURN void mp_raise_OSError(int errno_) { NORETURN void mp_raise_NotImplementedError(const char *msg) { mp_raise_msg(&mp_type_NotImplementedError, msg); } + +#if MICROPY_STACK_CHECK +NORETURN void mp_raise_recursion_depth(void) { + nlr_raise(mp_obj_new_exception_arg1(&mp_type_RuntimeError, + MP_OBJ_NEW_QSTR(MP_QSTR_maximum_space_recursion_space_depth_space_exceeded))); +} +#endif |