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

Method errorCallback

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

Source from the content-addressed store, hash-verified

207}
208
209void Console::errorCallback(const v8::FunctionCallbackInfo <v8::Value>& info) {
210 try {
211 std::string log = "CONSOLE ERROR: ";
212 log += buildLogString(info);
213
214 sendToADBLogcat(log, ANDROID_LOG_ERROR);
215 sendToDevToolsFrontEnd(info.GetIsolate(), ConsoleAPIType::kError, info);
216 } catch (NativeScriptException& e) {
217 e.ReThrowToV8();
218 } catch (std::exception e) {
219 std::stringstream ss;
220 ss << "Error: c++ exception: " << e.what() << std::endl;
221 NativeScriptException nsEx(ss.str());
222 nsEx.ReThrowToV8();
223 } catch (...) {
224 NativeScriptException nsEx(std::string("Error: c++ exception!"));
225 nsEx.ReThrowToV8();
226 }
227}
228
229void Console::infoCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
230 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