Skip to content

Commit

Permalink
Merge pull request #78 from elazar/fix/template-render-exceptions
Browse files Browse the repository at this point in the history
Fixed Template->render() exception handling
  • Loading branch information
reinink committed Jul 9, 2015
2 parents 207bf83 + e686b8d commit 2d8569e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Template/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,11 @@ public function render(array $data = array())

return $content;
} catch (LogicException $e) {
ob_end_clean();
if (ob_get_length() > 0) {
ob_end_clean();
}

throw new LogicException($e->getMessage());
throw $e;
}
}

Expand Down

0 comments on commit 2d8569e

Please sign in to comment.