Issue #2519 - Use parser error reporter to report missing module exports

This commit is contained in:
Martok 2024-06-02 21:15:57 +02:00 committed by roytam1
commit 2128ac642e

View file

@ -2286,8 +2286,7 @@ Parser<FullParseHandler>::moduleBody(ModuleSharedContext* modulesc)
if (!str.encodeLatin1(context, name))
return null();
JS_ReportErrorNumberLatin1(context->asJSContext(), GetErrorMessage, nullptr,
JSMSG_MISSING_EXPORT, str.ptr());
error(JSMSG_MISSING_EXPORT, str.ptr());
return null();
}