diff --git a/src/Module/Special/HTTPException.php b/src/Module/Special/HTTPException.php index d2c850385..55357d09c 100644 --- a/src/Module/Special/HTTPException.php +++ b/src/Module/Special/HTTPException.php @@ -50,7 +50,13 @@ class HTTPException $message = $explanation[$e->getCode()] ?? ''; } - return ['$title' => $title, '$message' => $message, '$back' => DI::l10n()->t('Go back')]; + $vars = ['$title' => $title, '$message' => $message, '$back' => DI::l10n()->t('Go back')]; + + if (is_site_admin()) { + $vars['$trace'] = $e->getTraceAsString(); + } + + return $vars; } /** diff --git a/view/templates/exception.tpl b/view/templates/exception.tpl index 6c2616890..04e9f82c0 100644 --- a/view/templates/exception.tpl +++ b/view/templates/exception.tpl @@ -2,5 +2,8 @@

{{$title}}

{{$message}}

+{{if $trace}} +
{{$trace nofilter}}
+{{/if}}

diff --git a/view/templates/http_status.tpl b/view/templates/http_status.tpl index 6b366d6f0..a9c094c4b 100644 --- a/view/templates/http_status.tpl +++ b/view/templates/http_status.tpl @@ -4,6 +4,9 @@

{{$title}}

-

{{$description nofilter}}

+

{{$message nofilter}}

+ {{if $trace}} +
{{$trace nofilter}}
+ {{/if}}