bootstrap: throw ERR_NOT_SUPPORTED_IN_SNAPSHOT in unsupported operation

This patch adds a new ERR_NOT_SUPPORTED_IN_SNAPSHOT error and throw
it in the worker constructor.

PR-URL: https://github.com/nodejs/node/pull/47887
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Joyee Cheung committed 2023-05-24 14:49:46 +02:00
1 parent 442dfc9b39
commit 7df27582bb
6 files changed
+61 -2

No files matched your search

+7
View File
@@ -2420,6 +2420,13 @@ error indicates that the idle loop has failed to stop.
An attempt was made to use operations that can only be used when building
V8 startup snapshot even though Node.js isn't building one.
<a id="ERR_NOT_SUPPORTED_IN_SNAPSHOT"></a>
### `ERR_NOT_SUPPORTED_IN_SNAPSHOT`
An attempt was made to perform operations that are not supported when
building a startup snapshot.
<a id="ERR_NO_CRYPTO"></a>
### `ERR_NO_CRYPTO`