| 267 | } |
| 268 | |
| 269 | void 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 | |
| 289 | void Console::dirCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 290 | try { |
nothing calls this directly
no test coverage detected