diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-10 12:56:45 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-06-10 12:56:45 +0200 |
commit | c0bdbd9d81eb22ded95cd7ea9b26a0c36cfa1be0 (patch) | |
tree | a19ffe5845e6af8d6ff037e798b887dc4ec275c3 /lib/template.php | |
parent | d264d0a79dd4433771da35f402d119de192a9a80 (diff) | |
download | nextcloud-server-c0bdbd9d81eb22ded95cd7ea9b26a0c36cfa1be0.tar.gz nextcloud-server-c0bdbd9d81eb22ded95cd7ea9b26a0c36cfa1be0.zip |
introduce and use executeAudited in db.php
Diffstat (limited to 'lib/template.php')
-rw-r--r-- | lib/template.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/template.php b/lib/template.php index 9467dedb62a..01f0fc28b60 100644 --- a/lib/template.php +++ b/lib/template.php @@ -535,4 +535,25 @@ class OC_Template{ $content->printPage(); die(); } + + /** + * print error page using Exception details + * @param Exception $exception + */ + + public static function printExceptionErrorPage(Exception $exception) { + $error_msg = $exception->getMessage(); + if ($exception->getCode()) { + $error_msg = '['.$exception->getCode().'] '.$error_msg; + } + $hint = $exception->getTraceAsString(); + while ($exception = $exception->previous()) { + $error_msg .= '<br/>Caused by: '; + if ($exception->getCode()) { + $error_msg .= '['.$exception->getCode().'] '; + } + $error_msg .= $exception->getMessage(); + }; + self::printErrorPage($error_msg, $hint); + } } |