src: ignore termination exceptions in fatal TryCatch
We don’t want these to terminate the process in case of Worker threads receiving a termination exception, rather than a “real one”. PR-URL: https://github.com/nodejs/node/pull/25141 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
This commit is contained in:
parent
4100001624
commit
a84e0ec0dd
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user