summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-11-20 17:29:58 +1100
committerDamien George <damien.p.george@gmail.com>2017-12-11 13:49:09 +1100
commit5b8998da6dfed6c8f54b8b34228f25d93dbb9d29 (patch)
treea968bc2a8d4459fb4ca29e4a3fc7195b689d0bc0 /py/runtime.c
parentc60fc670ea9c2f525e16bb5a175db077b71b93e6 (diff)
downloadmicropython-5b8998da6dfed6c8f54b8b34228f25d93dbb9d29.tar.gz
micropython-5b8998da6dfed6c8f54b8b34228f25d93dbb9d29.zip
py/runtime: Move mp_exc_recursion_depth to runtime and rename to raise.
For consistency this helper function is renamed to match the other exception helpers, and moved to their location in runtime.c.
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c7
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