mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:00:16 +00:00
Add trace for admin in exceptionpages
- Fix exception message not showing on raw exception page
This commit is contained in:
parent
bac5159f6f
commit
3ebc0371b7
3 changed files with 14 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,5 +2,8 @@
|
|||
<img class="hare" src="images/friendica-404_svg_flexy-o-hare.png"/>
|
||||
<h1>{{$title}}</h1>
|
||||
<p>{{$message}}</p>
|
||||
{{if $trace}}
|
||||
<pre>{{$trace nofilter}}</pre>
|
||||
{{/if}}
|
||||
<p><button type="button" onclick="window.history.back()" class="btn btn-primary">{{$back}}</button></p>
|
||||
</div>
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
</head>
|
||||
<body>
|
||||
<h1>{{$title}}</h1>
|
||||
<p>{{$description nofilter}}</p>
|
||||
<p>{{$message nofilter}}</p>
|
||||
{{if $trace}}
|
||||
<pre>{{$trace nofilter}}</pre>
|
||||
{{/if}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue