summaryrefslogtreecommitdiff
path: root/src/inspector_agent.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspector_agent.cc')
-rw-r--r--src/inspector_agent.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc
index 91a57b9944..57228ed953 100644
--- a/src/inspector_agent.cc
+++ b/src/inspector_agent.cc
@@ -839,11 +839,12 @@ void Agent::ToggleAsyncHook(Isolate* isolate,
HandleScope handle_scope(isolate);
CHECK(!fn.IsEmpty());
auto context = parent_env_->context();
- auto result = fn.Get(isolate)->Call(context, Undefined(isolate), 0, nullptr);
- if (result.IsEmpty()) {
- FatalError(
- "node::inspector::Agent::ToggleAsyncHook",
- "Cannot toggle Inspector's AsyncHook, please report this.");
+ v8::TryCatch try_catch(isolate);
+ USE(fn.Get(isolate)->Call(context, Undefined(isolate), 0, nullptr));
+ if (try_catch.HasCaught()) {
+ PrintCaughtException(isolate, context, try_catch);
+ FatalError("\nnode::inspector::Agent::ToggleAsyncHook",
+ "Cannot toggle Inspector's AsyncHook, please report this.");
}
}