Skip to content

Commit 0134d76

Browse files
committed
Simplified everything
1 parent 19bfa2e commit 0134d76

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,18 @@ protected function findTemplate($template, $throw = true)
7777
try {
7878
$file = parent::findTemplate($logicalName);
7979
} catch (\Twig_Error_Loader $e) {
80-
$previous = $e;
81-
$errorMessage = $e->getMessage();
80+
$twigLoaderException = $e;
8281

8382
// for BC
8483
try {
8584
$template = $this->parser->parse($template);
8685
$file = $this->locator->locate($template);
8786
} catch (\Exception $e) {
88-
$previous = $e;
8987
}
9088
}
9189

9290
if (false === $file || null === $file) {
93-
throw new \Twig_Error_Loader($errorMessage, -1, null, $previous);
91+
throw $twigLoaderException;
9492
}
9593

9694
return $this->cache[$logicalName] = $file;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy