Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/lib/embed/abort_.c

8 lines
167 B
C
Raw Normal View History

lib/embed/abort_: Implementation of abort_() function raising uPy exception. Helpful when porting existing C libraries to MicroPython. abort()ing in embedded environment isn't a good idea, so when compiling such library, -Dabort=abort_ option can be given to redirect standard abort() to this "safe" version.
2016-07-30 00:35:50 +03:00
#include <py/runtime.h>
lib/abort_.c: Add prototype to make coverage build happy.
2016-07-30 17:52:06 +03:00
NORETURN void abort_(void);
NORETURN void abort_(void) {
lib/embed/abort_: Implementation of abort_() function raising uPy exception. Helpful when porting existing C libraries to MicroPython. abort()ing in embedded environment isn't a good idea, so when compiling such library, -Dabort=abort_ option can be given to redirect standard abort() to this "safe" version.
2016-07-30 00:35:50 +03:00
nlr_raise(mp_obj_new_exception_msg(&mp_type_RuntimeError, "abort() called"));
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 54ms Template: 0ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API