diff options
author | Harshitha KP <harshi46@in.ibm.com> | 2020-02-03 08:06:35 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-02-19 21:54:59 +0300 |
commit | 2d3717ad847665de333c85e5239ad4e6a4c0eb95 (patch) | |
tree | 3d2c5be8ad0084e912e15bc58a3d512182beb6db /src/node_worker.h | |
parent | b8e41774d4287d128a40f7ecfecf170fe16fe9ed (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.h | 2 |
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; |