Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0134d76

Browse filesBrowse files
committed
Simplified everything
1 parent 19bfa2e commit 0134d76
Copy full SHA for 0134d76

File tree

1 file changed

+2
-4
lines changed
Filter options

1 file changed

+2
-4
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php
+2-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.