Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshitha KP <harshi46@in.ibm.com>2020-02-03 08:06:35 +0300
committerAnna Henningsen <anna@addaleax.net>2020-02-19 21:54:59 +0300
commit2d3717ad847665de333c85e5239ad4e6a4c0eb95 (patch)
tree3d2c5be8ad0084e912e15bc58a3d512182beb6db /src/node_worker.h
parentb8e41774d4287d128a40f7ecfecf170fe16fe9ed (diff)
worker: emit runtime error on loop creation failure
Instead of hard asserting throw a runtime error, that is more consumable. Fixes: https://github.com/nodejs/node/issues/31614 PR-URL: https://github.com/nodejs/node/pull/31621 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_worker.h')
-rw-r--r--src/node_worker.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_worker.h b/src/node_worker.h
index 0c6fd35c0ab..dbd28610994 100644
--- a/src/node_worker.h
+++ b/src/node_worker.h
@@ -85,6 +85,8 @@ class Worker : public AsyncWrap {
bool thread_joined_ = true;
const char* custom_error_ = nullptr;
+ std::string custom_error_str_;
+ bool loop_init_failed_ = false;
int exit_code_ = 0;
uint64_t thread_id_ = -1;
uintptr_t stack_base_ = 0;