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

Method warnCallback

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

Source from the content-addressed store, hash-verified

267}
268
269void Console::warnCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
270 try {
271 std::string log = "CONSOLE WARN: ";
272 log += buildLogString(info);
273
274 sendToADBLogcat(log, ANDROID_LOG_WARN);
275 sendToDevToolsFrontEnd(info.GetIsolate(), ConsoleAPIType::kWarning, info);
276 } catch (NativeScriptException& e) {
277 e.ReThrowToV8();
278 } catch (std::exception e) {
279 std::stringstream ss;
280 ss << "Error: c++ exception: " << e.what() << std::endl;
281 NativeScriptException nsEx(ss.str());
282 nsEx.ReThrowToV8();
283 } catch (...) {
284 NativeScriptException nsEx(std::string("Error: c++ exception!"));
285 nsEx.ReThrowToV8();
286 }
287}
288
289void Console::dirCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
290 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