In some specific situations, the L10N bundle isn't loadable yet (for
example when there is an issue with the app_config table). In such case,
we still want to be able to log the real exception.
This fixes errors that say "OC_L10N_String::__toString must not throw
exceptions"
if (!empty($hint)) {
$hint = '<pre>'.$hint.'</pre>';
}
- $l = OC_L10N::get('lib');
while (method_exists($exception, 'previous') && $exception = $exception->previous()) {
- $error_msg .= '<br/>'.$l->t('Caused by:').' ';
+ $error_msg .= '<br/>Caused by:' . ' ';
if ($exception->getCode()) {
$error_msg .= '['.$exception->getCode().'] ';
}
}
// include cause
- $l = \OC_L10N::get('lib');
while (method_exists($ex, 'getPrevious') && $ex = $ex->getPrevious()) {
- $message .= ' - '.$l->t('Caused by:').' ';
+ $message .= ' - Caused by:' . ' ';
$message .= $ex->getMessage();
if ($ex->getCode()) {
$message .= '[' . $ex->getCode() . '] ';