summaryrefslogtreecommitdiffstatshomepage
path: root/lib/embed/abort_.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/embed/abort_.c')
-rw-r--r--lib/embed/abort_.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/embed/abort_.c b/lib/embed/abort_.c
new file mode 100644
index 0000000000..a6df8143c3
--- /dev/null
+++ b/lib/embed/abort_.c
@@ -0,0 +1,7 @@
+#include <py/runtime.h>
+
+NORETURN void abort_(void);
+
+NORETURN void abort_(void) {
+ nlr_raise(mp_obj_new_exception_msg(&mp_type_RuntimeError, "abort() called"));
+}