Browse Source

Improved thrown MissingElementException message

Currently, the exception message is just the file location.name ($file). Added some context.
JayPHP 9 years ago
parent
commit
5bb25cee2a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/View/View.php

+ 3 - 1
src/View/View.php

@@ -505,7 +505,9 @@ class View implements EventDispatcherInterface
             list ($plugin, $name) = pluginSplit($name, true);
             $name = str_replace('/', DIRECTORY_SEPARATOR, $name);
             $file = $plugin . 'Element' . DIRECTORY_SEPARATOR . $name . $this->_ext;
-            throw new MissingElementException($file);
+            throw new MissingElementException(
+                sprintf('Element file "%s" is missing', $file)
+            );
         }
     }