mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
src: print native module id on native module not found
To help core contributors identify which file is missing from the build. PR-URL: https://github.com/nodejs/node/pull/39460 Refs: https://github.com/nodejs/node/issues/39408 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
3fb484f4e3
commit
834ae63d61
1 file changed
+4
-1
@@ -224,7 +224,10 @@ MaybeLocal<String> NativeModuleLoader::LoadBuiltinModuleSource(Isolate* isolate,
|
||||
isolate, contents.c_str(), v8::NewStringType::kNormal, contents.length());
|
||||
#else
|
||||
const auto source_it = source_.find(id);
|
||||
CHECK_NE(source_it, source_.end());
|
||||
if (UNLIKELY(source_it == source_.end())) {
|
||||
fprintf(stderr, "Cannot find native builtin: \"%s\".\n", id);
|
||||
ABORT();
|
||||
}
|
||||
return source_it->second.ToStringChecked(isolate);
|
||||
#endif // NODE_BUILTIN_MODULES_PATH
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user