Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle throwable #2041

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
handle throwable
fprochazka committed May 13, 2016
commit 7d29b0b7c5b05e9bce27f48630f72ebb64406eb9
6 changes: 6 additions & 0 deletions lib/Twig/Template.php
Original file line number Diff line number Diff line change
@@ -359,6 +359,12 @@ public function render(array $context)
ob_end_clean();
}

throw $e;
} catch (Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}

throw $e;
}