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

Method infoCallback

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

Source from the content-addressed store, hash-verified

227}
228
229void Console::infoCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
230 try {
231 std::string log = "CONSOLE INFO: ";
232 log += buildLogString(info);
233
234 sendToADBLogcat(log, ANDROID_LOG_INFO);
235 sendToDevToolsFrontEnd(info.GetIsolate(), ConsoleAPIType::kInfo, info);
236 } catch (NativeScriptException& e) {
237 e.ReThrowToV8();
238 } catch (std::exception e) {
239 std::stringstream ss;
240 ss << "Error: c++ exception: " << e.what() << std::endl;
241 NativeScriptException nsEx(ss.str());
242 nsEx.ReThrowToV8();
243 } catch (...) {
244 NativeScriptException nsEx(std::string("Error: c++ exception!"));
245 nsEx.ReThrowToV8();
246 }
247}
248
249void Console::logCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
250 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