@@ -1132,8 +1132,7 @@ ExitCode GenerateAndWriteSnapshotData(const SnapshotData** snapshot_data_ptr,
11321132 " node:embedded_snapshot_main was specified as snapshot "
11331133 " entry point but Node.js was built without embedded "
11341134 " snapshot.\n " );
1135- // TODO(joyeecheung): should be kInvalidCommandLineArgument instead.
1136- exit_code = ExitCode::kGenericUserError ;
1135+ exit_code = ExitCode::kInvalidCommandLineArgument ;
11371136 return exit_code;
11381137 }
11391138 } else {
@@ -1166,8 +1165,7 @@ ExitCode GenerateAndWriteSnapshotData(const SnapshotData** snapshot_data_ptr,
11661165 fprintf (stderr,
11671166 " Cannot open %s for writing a snapshot.\n " ,
11681167 snapshot_blob_path.c_str ());
1169- // TODO(joyeecheung): should be kStartupSnapshotFailure.
1170- exit_code = ExitCode::kGenericUserError ;
1168+ exit_code = ExitCode::kStartupSnapshotFailure ;
11711169 }
11721170 return exit_code;
11731171}
@@ -1183,17 +1181,16 @@ ExitCode LoadSnapshotDataAndRun(const SnapshotData** snapshot_data_ptr,
11831181 FILE* fp = fopen (filename.c_str (), " rb" );
11841182 if (fp == nullptr ) {
11851183 fprintf (stderr, " Cannot open %s" , filename.c_str ());
1186- // TODO(joyeecheung): should be kStartupSnapshotFailure.
1187- exit_code = ExitCode::kGenericUserError ;
1184+ exit_code = ExitCode::kStartupSnapshotFailure ;
11881185 return exit_code;
11891186 }
11901187 std::unique_ptr<SnapshotData> read_data = std::make_unique<SnapshotData>();
11911188 bool ok = SnapshotData::FromFile (read_data.get (), fp);
11921189 fclose (fp);
11931190 if (!ok) {
1194- // If we fail to read the customized snapshot, simply exit with 1.
1195- // TODO(joyeecheung): should be kStartupSnapshotFailure.
1196- exit_code = ExitCode::kGenericUserError ;
1191+ // If we fail to read the customized snapshot,
1192+ // simply exit with kStartupSnapshotFailure.
1193+ exit_code = ExitCode::kStartupSnapshotFailure ;
11971194 return exit_code;
11981195 }
11991196 *snapshot_data_ptr = read_data.release ();
0 commit comments