Add missing first file/line in exception template
This commit is contained in:
parent
e342f69e21
commit
beaef12296
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
<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 $thrown}}
|
||||
<pre>{{$thrown}}
|
||||
{{$stack_trace}}
|
||||
{{$trace}}</pre>
|
||||
{{/if}}
|
||||
<p><button type="button" onclick="window.history.back()" class="btn btn-primary">{{$back}}</button></p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user