summaryrefslogtreecommitdiff
path: root/lib/internal/errors.js
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2022-04-18 12:36:36 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2022-06-17 19:23:56 +0800
commita36a5469c27a60bc2d9ff590fbf145d59529d9d6 (patch)
tree315e4b9c098055e222ea23e0a5baf84ff57804b1 /lib/internal/errors.js
parent027c2880a642c94b5927bbb7f90923f415ff9f39 (diff)
downloadnode-new-a36a5469c27a60bc2d9ff590fbf145d59529d9d6.tar.gz
v8: add v8.startupSnapshot utils
This adds several APIs under the `v8.startupSnapshot` namespace for specifying hooks into the startup snapshot serialization and deserialization. - isBuildingSnapshot() - addSerializeCallback() - addDeserializeCallback() - setDeserializeMainFunction() PR-URL: https://github.com/nodejs/node/pull/43329 Fixes: https://github.com/nodejs/node/issues/42617 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal/errors.js')
-rw-r--r--lib/internal/errors.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/internal/errors.js b/lib/internal/errors.js
index 306dcbad99..7570315abe 100644
--- a/lib/internal/errors.js
+++ b/lib/internal/errors.js
@@ -978,6 +978,8 @@ E('ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE',
'The `domain` module is in use, which is mutually exclusive with calling ' +
'process.setUncaughtExceptionCaptureCallback()',
Error);
+E('ERR_DUPLICATE_STARTUP_SNAPSHOT_MAIN_FUNCTION',
+ 'Deserialize main function is already configured.', Error);
E('ERR_ENCODING_INVALID_ENCODED_DATA', function(encoding, ret) {
this.errno = ret;
return `The encoded data was not valid for encoding ${encoding}`;
@@ -1456,6 +1458,8 @@ E('ERR_NETWORK_IMPORT_BAD_RESPONSE',
"import '%s' received a bad response: %s", Error);
E('ERR_NETWORK_IMPORT_DISALLOWED',
"import of '%s' by %s is not supported: %s", Error);
+E('ERR_NOT_BUILDING_SNAPSHOT',
+ 'Operation cannot be invoked when not building startup snapshot', Error);
E('ERR_NO_CRYPTO',
'Node.js is not compiled with OpenSSL crypto support', Error);
E('ERR_NO_ICU',