MCPcopy Create free account
hub / github.com/android/ndk-samples / fatal

Function fatal

native-activity/app/src/main/cpp/main.cpp:27–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#define LOGI(fmt, ...) _LOG(ANDROID_LOG_INFO, (fmt)__VA_OPT__(, ) __VA_ARGS__)
26
27[[noreturn]] __attribute__((__format__(__printf__, 1, 2))) static void fatal(
28 const char* fmt, ...) {
29 va_list ap;
30 va_start(ap, fmt);
31 char* buf;
32 if (vasprintf(&buf, fmt, ap) < 0) {
33 android_set_abort_message("failed for format error message");
34 } else {
35 android_set_abort_message(buf);
36 // Also log directly, since the default Android Studio logcat filter hides
37 // the backtrace which would otherwise show the abort message.
38 LOGE("%s", buf);
39 }
40 std::abort();
41}
42
43#define CHECK_NOT_NULL(value) \
44 do { \

Callers 2

UpdateMethod · 0.85
android_mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected