| 247 | } |
| 248 | |
| 249 | void 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 | |
| 269 | void Console::warnCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 270 | try { |
nothing calls this directly
no test coverage detected