Skip to content

Commit 98bf692

Browse files
committed
src,test: update snapshot failure in node.cc and associated test
1 parent d7253b8 commit 98bf692

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/node.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1156,8 +1156,7 @@ ExitCode LoadSnapshotDataAndRun(const SnapshotData** snapshot_data_ptr,
11561156
FILE* fp = fopen(filename.c_str(), "rb");
11571157
if (fp == nullptr) {
11581158
fprintf(stderr, "Cannot open %s", filename.c_str());
1159-
// TODO(joyeecheung): should be kStartupSnapshotFailure.
1160-
exit_code = ExitCode::kGenericUserError;
1159+
exit_code = ExitCode::kStartupSnapshotFailure;
11611160
return exit_code;
11621161
}
11631162
std::unique_ptr<SnapshotData> read_data = std::make_unique<SnapshotData>();

test/parallel/test-snapshot-error.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const entry = fixtures.path('snapshot', 'error.js');
4747
console.log(child.status);
4848
console.log(stderr);
4949
console.log(child.stdout.toString());
50-
assert.strictEqual(child.status, 1);
50+
assert.strictEqual(child.status, 14);
5151
assert.match(stderr, /Cannot open/);
5252
assert(!fs.existsSync(path.join(tmpdir.path, 'snapshot.blob')));
5353
}

0 commit comments

Comments
 (0)