Skip to content

Removed try...catch which prevents Symfony to notify files not found. #3273

Closed
wants to merge 1 commit into from
View
10 src/Symfony/Bundle/FrameworkBundle/Templating/Loader/FilesystemLoader.php
@@ -40,17 +40,11 @@ public function __construct(FileLocatorInterface $locator)
*
* @param TemplateReferenceInterface $template A template
*
- * @return Storage|Boolean false if the template cannot be loaded, a Storage instance otherwise
+ * @return FileStorage
*/
public function load(TemplateReferenceInterface $template)
{
- try {
- $file = $this->locator->locate($template);
- } catch (\InvalidArgumentException $e) {
- return false;
- }
-
- return new FileStorage($file);
+ return new FileStorage($this->locator->locate($template));
}
/**
Something went wrong with that request. Please try again.