| 207 | } |
| 208 | |
| 209 | void 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 | |
| 229 | void Console::infoCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 230 | try { |
nothing calls this directly
no test coverage detected