Skip to content

Commit c28abee

Browse files
Throw exception before download query if entry is not valid
1 parent 8adabc1 commit c28abee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function downloadPackages(array $importMapEntries, callable $progressCall
162162
foreach ($importMapEntries as $package => $entry) {
163163
$pattern = ImportMapType::CSS === $entry->type ? $this->distUrlCssPattern : $this->distUrlPattern;
164164
if (null === $entry->packageName || null === $entry->version || null === $entry->filePath) {
165-
throw new RuntimeException(sprintf('The package %s cannot be downloaded. "packageName", "version" or "filePath" must be defined.', $entry->importName));
165+
throw new RuntimeException(sprintf('The package "%s" cannot be downloaded. "packageName", "version" or "filePath" must be defined.', $entry->importName));
166166
}
167167
$url = sprintf($pattern, $entry->packageName, $entry->version, $entry->filePath);
168168

0 commit comments

Comments
 (0)