node/doc/api
Joyee Cheung 49bb1c6832
bootstrap: handle snapshot errors gracefully
This patch refactors the SnapshotBuilder::Generate() routines
so that when running into errors during the snapshot building
process, they can exit gracefully by printing the error
and return a non-zero exit code. If the error is likely to
be caused by internal scripts, the return code would be 12,
if the error is caused by user scripts the return code would
be 1. In addition this refactors the generation of embedded
snapshots and directly writes to the output file stream
instead of producing an intermediate string with string
streams.

PR-URL: https://github.com/nodejs/node/pull/43531
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-07-15 14:34:52 +08:00
..
addons.md doc: fix Embedder's Guide link to V8 official docs 2022-03-17 09:25:43 +00:00
assert.md doc: use serial comma in assert docs 2022-05-20 10:33:16 +01:00
async_context.md doc: make minor adjustments 2022-05-24 10:27:17 +01:00
async_hooks.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
buffer.md doc: make minor adjustments 2022-05-24 10:27:17 +01:00
child_process.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
cli.md 2022-07-07, Version 18.5.0 (Current) 2022-07-07 09:59:35 -04:00
cluster.md doc: use serial comma in cluster docs 2022-05-06 15:56:56 +01:00
console.md doc: use serial comma in console docs 2022-05-31 14:57:50 +01:00
corepack.md doc: make minor adjustments 2022-05-24 10:27:17 +01:00
crypto.md doc,test: clarify timingSafeEqual semantics 2022-06-21 12:43:09 +01:00
debugger.md debugger: add debugger alias for exec(expr) 2022-02-17 19:23:20 +00:00
deprecations.md doc: deprecate diagnostics_channel object subscribe method 2022-07-14 16:12:22 +00:00
dgram.md 2022-06-16, Version 18.4.0 (Current) 2022-06-16 09:45:05 -04:00
diagnostics_channel.md doc: deprecate diagnostics_channel object subscribe method 2022-07-14 16:12:22 +00:00
dns.md doc: revert anachronistic 'node:' module require()s in API history notes 2022-07-14 16:24:08 +01:00
documentation.md doc: add stability class to legacy status description 2022-03-30 17:49:29 +02:00
domain.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
embedding.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
errors.md 2022-07-13, Version 18.6.0 (Current) 2022-07-13 22:52:14 +02:00
esm.md 2022-07-13, Version 18.6.0 (Current) 2022-07-13 22:52:14 +02:00
events.md doc: add ESM version examples to events api doc 2022-06-18 17:37:23 +02:00
fs.md doc: revert anachronistic 'node:' module require()s in API history notes 2022-07-14 16:24:08 +01:00
globals.md doc: fix typo in globals.md 2022-06-10 09:24:50 +01:00
http2.md http2: improve tests and docs 2022-05-24 12:29:56 +01:00
http.md http: use Keep-Alive by default in global agents 2022-06-29 12:48:52 +02:00
https.md http: use Keep-Alive by default in global agents 2022-06-29 12:48:52 +02:00
index.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
inspector.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
intl.md doc: fix icu-small example 2022-06-30 09:34:10 -04:00
module.md 2022-07-13, Version 18.6.0 (Current) 2022-07-13 22:52:14 +02:00
modules.md doc: use serial comma in modules docs 2022-05-14 21:16:44 +01:00
n-api.md doc: fix napi version for node_api_symbol_for 2022-05-27 13:55:40 -04:00
net.md 2022-07-13, Version 18.6.0 (Current) 2022-07-13 22:52:14 +02:00
os.md 2022-06-16, Version 18.4.0 (Current) 2022-06-16 09:45:05 -04:00
packages.md doc: packages documentation updates for 12 EOL 2022-06-15 13:44:02 -07:00
path.md doc: revert anachronistic 'node:' module require()s in API history notes 2022-07-14 16:24:08 +01:00
perf_hooks.md http: add perf_hooks detail for http request and client 2022-06-25 11:37:20 +01:00
policy.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
process.md bootstrap: handle snapshot errors gracefully 2022-07-15 14:34:52 +08:00
punycode.md doc: format doc/api/*.md with markdown formatter 2021-10-20 11:59:11 +02:00
querystring.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
readline.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
repl.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
report.md doc: use serial comma in report docs 2022-06-13 11:00:49 +01:00
stream.md stream: initial approach to include strategy options on Readable.toWeb() 2022-07-13 11:14:38 +01:00
string_decoder.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
synopsis.md doc: use ASCII apostrophes consistently 2022-05-17 20:04:51 +01:00
test.md test_runner: support timeout for tests 2022-07-14 09:11:42 +01:00
timers.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
tls.md 2022-06-16, Version 18.4.0 (Current) 2022-06-16 09:45:05 -04:00
tracing.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
tty.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
url.md doc: use ASCII apostrophes consistently 2022-05-17 20:04:51 +01:00
util.md util: add maxArrayLength option to Set and Map 2022-07-14 16:24:19 +01:00
v8.md 2022-07-13, Version 18.6.0 (Current) 2022-07-13 22:52:14 +02:00
vm.md doc: order vm.Module linker arguments correctly 2022-04-22 12:44:35 +02:00
wasi.md doc: add node: prefix for all core modules 2022-04-20 10:23:41 +02:00
webcrypto.md crypto: update Wrapping and unwrapping keys webcrypto example 2022-06-20 14:42:33 +01:00
webstreams.md doc: use serial comma in webstreams docs 2022-06-09 10:58:47 +01:00
worker_threads.md doc: use serial comma in worker_threads docs 2022-05-28 13:09:47 +01:00
zlib.md doc: use ASCII apostrophes consistently 2022-05-17 20:04:51 +01:00