| 227 | } |
| 228 | |
| 229 | void 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 | |
| 249 | void Console::logCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 250 | try { |
nothing calls this directly
no test coverage detected