MCPcopy Create free account
hub / github.com/NativeScript/android / LogAndAbortUncaught

Function LogAndAbortUncaught

test-app/runtime/src/main/cpp/Runtime.cpp:75–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void LogAndAbortUncaught() {
76 try {
77 throw; // rethrow the current unknown
78 } catch (const tns::NativeScriptException& e) {
79 // We only have message/stack; no safe ReThrowToJava here.
80 __android_log_print(ANDROID_LOG_FATAL, "TNS.Native",
81 "Uncaught NativeScriptException: %s", e.what());
82 } catch (const std::exception& e) {
83 __android_log_print(ANDROID_LOG_FATAL, "TNS.Native",
84 "Uncaught std::exception: %s", e.what());
85 } catch (...) {
86 __android_log_print(ANDROID_LOG_FATAL, "TNS.Native",
87 "Uncaught unknown native exception");
88 }
89
90 // Preserve default abort behavior so crashes are visible to tooling
91 std::_Exit(EXIT_FAILURE);
92}
93
94void Runtime::Init(JavaVM* vm, void* reserved) {
95 __android_log_print(ANDROID_LOG_INFO, "TNS.Runtime",

Callers

nothing calls this directly

Calls 1

whatMethod · 0.45

Tested by

no test coverage detected