Only display call trace in debug mode

This commit is contained in:
Bart Visscher 2013-07-21 22:56:21 +02:00
parent aa22194a09
commit 25e3c9cbeb
1 changed files with 17 additions and 10 deletions

View File

@ -531,6 +531,7 @@ class OC_Template{
if ($exception->getCode()) {
$error_msg = '['.$exception->getCode().'] '.$error_msg;
}
if (defined('DEBUG') and DEBUG) {
$hint = $exception->getTraceAsString();
if (!empty($hint)) {
$hint = '<pre>'.$hint.'</pre>';
@ -542,6 +543,12 @@ class OC_Template{
}
$error_msg .= $exception->getMessage();
};
} else {
$hint = '';
if ($exception instanceof \OC\HintException) {
$hint = $exception->getHint();
}
}
self::printErrorPage($error_msg, $hint);
}
}