Improve logging and error handling (#3059)

* refactor: logging and errror handling
This commit is contained in:
Dag 2022-10-16 17:55:43 +02:00 committed by GitHub
parent e21394d2d3
commit ffbc107687
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 143 additions and 93 deletions

View file

@ -1,21 +1,17 @@
<section>
<p class="exception-message">
<?= e($message ?? '') ?>
<?= e($message) ?>
</p>
<?php if (isset($stacktrace)): ?>
<?php foreach ($stacktrace as $frame): ?>
<code>
<?= e($frame) ?>
</code>
<br>
<?php endforeach; ?>
<?php endif; ?>
<?php foreach ($trace as $i => $frame) : ?>
#<?= $i ?> <?= e(frame_to_call_point($frame)) ?>
<br>
<?php endforeach; ?>
<br>
<p>
Query string: <?= e($_SERVER['QUERY_STRING'] ?? '') ?>
Query string: <?= e(urldecode($_SERVER['QUERY_STRING']) ?? '') ?>
</p>
<p>
Version: <?= raw(Configuration::getVersion()) ?>
@ -24,26 +20,19 @@
OS: <?= raw(PHP_OS_FAMILY) ?>
</p>
<p>
PHP version: <?= raw(phpversion() ?: 'Unknown'()) ?>
PHP version: <?= raw(PHP_VERSION ?: 'Unknown') ?>
</p>
<div class="advice">
<ul class="advice">
<li>Press Return to check your input parameters</li>
<li>Press F5 to retry</li>
<li>Check if this issue was already reported on <a href="<?= raw($searchUrl) ?>">GitHub</a> (give it a thumbs-up)</li>
<li>Open a <a href="<?= raw($issueUrl) ?>">GitHub Issue</a> if this error persists</li>
</ul>
</div>
<a href="<?= raw($searchUrl) ?>" title="Opens GitHub to search for similar issues">
<button>Search GitHub Issues</button>
<button>Find similar bugs</button>
</a>
<a href="<?= raw($issueUrl) ?>" title="After clicking this button you can review the issue before submitting it">
<button>Open GitHub Issue</button>
<button>Create GitHub Issue</button>
</a>
<p class="maintainer"><?= e($bridge->getMaintainer()) ?></p>
<p class="maintainer">
<?= e($maintainer) ?>
</p>
</section>