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

Method logCallback

test-app/runtime/src/main/cpp/console/Console.cpp:249–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249void Console::logCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
250 try {
251 std::string log = "CONSOLE LOG: ";
252 log += buildLogString(info);
253
254 sendToADBLogcat(log, ANDROID_LOG_INFO);
255 sendToDevToolsFrontEnd(info.GetIsolate(), ConsoleAPIType::kLog, info);
256 } catch (NativeScriptException& e) {
257 e.ReThrowToV8();
258 } catch (std::exception e) {
259 std::stringstream ss;
260 ss << "Error: c++ exception: " << e.what() << std::endl;
261 NativeScriptException nsEx(ss.str());
262 nsEx.ReThrowToV8();
263 } catch (...) {
264 NativeScriptException nsEx(std::string("Error: c++ exception!"));
265 nsEx.ReThrowToV8();
266 }
267}
268
269void Console::warnCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
270 try {

Callers

nothing calls this directly

Calls 4

buildLogStringFunction · 0.85
ReThrowToV8Method · 0.80
GetIsolateMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected