diff --git a/src/Module/Special/HTTPException.php b/src/Module/Special/HTTPException.php
index ed962a423..1bfae2a36 100644
--- a/src/Module/Special/HTTPException.php
+++ b/src/Module/Special/HTTPException.php
@@ -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();
}
diff --git a/view/templates/exception.tpl b/view/templates/exception.tpl
index 04e9f82c0..4b2966141 100644
--- a/view/templates/exception.tpl
+++ b/view/templates/exception.tpl
@@ -2,8 +2,10 @@
{{$message}}
-{{if $trace}} -{{$trace nofilter}}+{{if $thrown}} +
{{$thrown}} +{{$stack_trace}} +{{$trace}}{{/if}}