Add missing first file/line in exception template

This commit is contained in:
Hypolite Petovan 2020-12-30 21:15:01 -05:00
parent e342f69e21
commit beaef12296
2 changed files with 11 additions and 3 deletions

View file

@ -69,9 +69,15 @@ class HTTPException
$message = $explanation[$e->getCode()] ?? '';
}
$vars = ['$title' => $title, '$message' => $message, '$back' => DI::l10n()->t('Go back')];
$vars = [
'$title' => $title,
'$message' => $message,
'$back' => DI::l10n()->t('Go back'),
'$stack_trace' => DI::l10n()->t('Stack trace:'),
];
if (is_site_admin()) {
$vars['$thrown'] = DI::l10n()->t('Exception thrown in %s:%d', $e->getFile(), $e->getLine());
$vars['$trace'] = $e->getTraceAsString();
}