MCPcopy Index your code
hub / github.com/nodejs/node / throwReadError

Function throwReadError

lib/internal/test_runner/snapshot.js:246–257  ·  view source on GitHub ↗
(err, filename)

Source from the content-addressed store, hash-verified

244}
245
246function throwReadError(err, filename) {
247 let msg = `Cannot read snapshot file '${filename}.'`;
248
249 if (err?.code === 'ENOENT') {
250 msg += ` ${kMissingSnapshotTip}`;
251 }
252
253 const error = new ERR_INVALID_STATE(msg);
254 error.cause = err;
255 error.filename = filename;
256 throw error;
257}
258
259function throwWriteError(err, filename) {
260 const msg = `Cannot write snapshot file '${filename}.'`;

Callers 2

readFileMethod · 0.85
createFileAssertMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…