diff --git a/src/node_errors.cc b/src/node_errors.cc index b7f7f59e70ef62..7775e36b69bc82 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -315,7 +315,7 @@ void OnFatalError(const char* location, const char* message) { namespace errors { TryCatchScope::~TryCatchScope() { - if (HasCaught() && mode_ == CatchMode::kFatal) { + if (HasCaught() && !HasTerminated() && mode_ == CatchMode::kFatal) { HandleScope scope(env_->isolate()); ReportException(env_, Exception(), Message()); exit(7);