| 113 | } |
| 114 | |
| 115 | void handle_exception(Isolate* isolate, TryCatch* try_catch) { |
| 116 | MaybeLocal<Value> trace = try_catch->StackTrace(isolate->GetCurrentContext()); |
| 117 | if (trace.IsEmpty()) { |
| 118 | v8::String::Utf8Value stack_trace(isolate, try_catch->Message()->Get()); |
| 119 | kinc_log(KINC_LOG_LEVEL_ERROR, "uncaught exception %s", *stack_trace); |
| 120 | } |
| 121 | else { |
| 122 | v8::String::Utf8Value stack_trace(isolate, trace.ToLocalChecked()); |
| 123 | kinc_log(KINC_LOG_LEVEL_ERROR, "uncaught exception %s", *stack_trace); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | void worker_post_message(const FunctionCallbackInfo<Value>& args) { |
| 128 | Isolate* isolate = args.GetIsolate(); |
no test coverage detected