Only display call trace in debug mode
This commit is contained in:
parent
aa22194a09
commit
25e3c9cbeb
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue