diff --git a/src/Module/Special/HTTPException.php b/src/Module/Special/HTTPException.php index d2c8503859..55357d09c6 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 6c26168908..04e9f82c02 100644 --- a/view/templates/exception.tpl +++ b/view/templates/exception.tpl @@ -2,5 +2,8 @@
{{$message}}
+{{if $trace}} +{{$trace nofilter}}+{{/if}} diff --git a/view/templates/http_status.tpl b/view/templates/http_status.tpl index 6b366d6f04..a9c094c4b2 100644 --- a/view/templates/http_status.tpl +++ b/view/templates/http_status.tpl @@ -4,6 +4,9 @@
{{$description nofilter}}
+{{$message nofilter}}
+ {{if $trace}} +{{$trace nofilter}}+ {{/if}}