Add trace for admin in exceptionpages
- Fix exception message not showing on raw exception page
This commit is contained in:
parent
bac5159f6f
commit
3ebc0371b7
|
@ -50,7 +50,13 @@ class HTTPException
|
||||||
$message = $explanation[$e->getCode()] ?? '';
|
$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"/>
|
<img class="hare" src="images/friendica-404_svg_flexy-o-hare.png"/>
|
||||||
<h1>{{$title}}</h1>
|
<h1>{{$title}}</h1>
|
||||||
<p>{{$message}}</p>
|
<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>
|
<p><button type="button" onclick="window.history.back()" class="btn btn-primary">{{$back}}</button></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>{{$title}}</h1>
|
<h1>{{$title}}</h1>
|
||||||
<p>{{$description nofilter}}</p>
|
<p>{{$message nofilter}}</p>
|
||||||
|
{{if $trace}}
|
||||||
|
<pre>{{$trace nofilter}}</pre>
|
||||||
|
{{/if}}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue