Skip to content

Commit 42ff6d9

Browse files
legendecasBethGriggs
authored andcommitted
src: print native module id on native module not found
To help core contributors identify which file is missing from the build. PR-URL: #39460 Refs: #39408 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent e4331cd commit 42ff6d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/node_native_module.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ MaybeLocal<String> NativeModuleLoader::LoadBuiltinModuleSource(Isolate* isolate,
224224
isolate, contents.c_str(), v8::NewStringType::kNormal, contents.length());
225225
#else
226226
const auto source_it = source_.find(id);
227-
CHECK_NE(source_it, source_.end());
227+
if (UNLIKELY(source_it == source_.end())) {
228+
fprintf(stderr, "Cannot find native builtin: \"%s\".\n", id);
229+
ABORT();
230+
}
228231
return source_it->second.ToStringChecked(isolate);
229232
#endif // NODE_BUILTIN_MODULES_PATH
230233
}

0 commit comments

Comments
 (0)