mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 19:15:34 +02:00
Added helpful message when theme can not be found
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user