summaryrefslogtreecommitdiffstats
path: root/lib/private/template/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/template/base.php')
-rw-r--r--lib/private/template/base.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/template/base.php b/lib/private/template/base.php
index 72abc38c36c..2c745b02a1d 100644
--- a/lib/private/template/base.php
+++ b/lib/private/template/base.php
@@ -168,8 +168,13 @@ class Base {
// Include
ob_start();
- include $file;
- $data = ob_get_contents();
+ try {
+ include $file;
+ $data = ob_get_contents();
+ } catch (\Exception $e) {
+ @ob_end_clean();
+ throw $e;
+ }
@ob_end_clean();
// Return data