diff --git a/system/src/Grav/Common/Themes.php b/system/src/Grav/Common/Themes.php index eb580889c..f5648391c 100644 --- a/system/src/Grav/Common/Themes.php +++ b/system/src/Grav/Common/Themes.php @@ -37,7 +37,12 @@ class Themes extends Iterator /** @var Themes $themes */ $themes = $this->grav['themes']; $themes->configure(); - $instance = $themes->load(); + + try { + $instance = $themes->load(); + } catch (\InvalidArgumentException $e) { + throw new \RuntimeException($this->current(). ' theme could not be found'); + } if ($instance instanceof EventSubscriberInterface) { $events->addSubscriber($instance);