- πΊπΈUnited States smustgrave
On D10.1 on this day
LogicException is thrown on line 132
LibraryDefinitionMissingLicenseException is thrown on line 148There are no other exceptions (not already documented) in the function buildByExtension()
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
We don't catch the two possible exceptions from
\Drupal\Core\Extension\ExtensionPathResolver::getPath
, or the exception from\Drupal\Core\Asset\LibraryDiscoveryParser::parseLibraryInfo
, or the exception from\Drupal\Core\Asset\LibraryDiscoveryParser::applyLibrariesOverride
So there's at least another 4 exceptions this method could throw.
So if we're updating things, let's add those other four in too.
- πΊπΈUnited States smustgrave
That was my fault I was relying on my phpstorm to fine things. They didn't flag those because the functions themselves call the @throws.
- π§π·Brazil lucassc Rio de Janeiro
Addressed to #29. Please, review.
- πΊπΈUnited States smustgrave
Thanks @lucassc looks like the functions from #29 have been captured.
The last submitted patch, 31: 2822575-31.patch, failed testing. View results β
-
larowlan β
committed 5c85e6d4 on 10.1.x
Issue #2822575 by martin107, lucassc, pooja saraah, Shubham Chandra,...
-
larowlan β
committed 5c85e6d4 on 10.1.x
-
larowlan β
committed a0218f8a on 10.0.x
Issue #2822575 by martin107, lucassc, pooja saraah, Shubham Chandra,...
-
larowlan β
committed a0218f8a on 10.0.x
-
larowlan β
committed 52604be5 on 9.5.x
Issue #2822575 by martin107, lucassc, pooja saraah, Shubham Chandra,...
-
larowlan β
committed 52604be5 on 9.5.x
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Committed to 10.1.x
Backported to 9.5.x and 10.0.x to keep them consistent and because the risk of regression is low.
Changed on commit as felt it was harsh to push back over the use of the word 'got'
diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php index 6fabab713bb..cf0d46be6b4 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php @@ -104,7 +104,7 @@ public function __construct($root, ModuleHandlerInterface $module_handler, Theme * @throws \UnknownExtensionException * Thrown when the extension is unknown. * @throws \InvalidLibraryFileException - * Thrown when a parser exception got thrown. + * Thrown when the library file is invalid. * @throws \InvalidLibrariesOverrideSpecificationException * Thrown when a definition refers to a non-existent library. * @throws \Drupal\Core\Asset\Exception\LibraryDefinitionMissingLicenseException
Automatically closed - issue fixed for 2 weeks with no activity.