mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
Merge pull request #23991 from owncloud/handle-exceptions-in-templates
Properly handle exception within templates
This commit is contained in:
commit
0cff70bb90
1 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue