Mercurial > hg > cmmr2012-drupal-site
diff core/lib/Drupal/Core/Extension/ThemeInstaller.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/Extension/ThemeInstaller.php Thu Feb 28 11:14:44 2019 +0000 +++ b/core/lib/Drupal/Core/Extension/ThemeInstaller.php Thu Feb 28 13:11:55 2019 +0000 @@ -7,6 +7,7 @@ use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\ConfigInstallerInterface; use Drupal\Core\Config\ConfigManagerInterface; +use Drupal\Core\Extension\Exception\UnknownExtensionException; use Drupal\Core\Routing\RouteBuilderInterface; use Drupal\Core\State\StateInterface; use Psr\Log\LoggerInterface; @@ -111,7 +112,7 @@ if ($missing = array_diff_key($theme_list, $theme_data)) { // One or more of the given themes doesn't exist. - throw new \InvalidArgumentException('Unknown themes: ' . implode(', ', $missing) . '.'); + throw new UnknownExtensionException('Unknown themes: ' . implode(', ', $missing) . '.'); } // Only process themes that are not installed currently. @@ -221,7 +222,7 @@ $list = $this->themeHandler->listInfo(); foreach ($theme_list as $key) { if (!isset($list[$key])) { - throw new \InvalidArgumentException("Unknown theme: $key."); + throw new UnknownExtensionException("Unknown theme: $key."); } if ($key === $theme_config->get('default')) { throw new \InvalidArgumentException("The current default theme $key cannot be uninstalled.");