1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-04 23:57:29 +02:00

feat: improve error handling (#2902)

This commit is contained in:
Dag
2022-07-08 20:39:13 +02:00
committed by GitHub
parent c992bcc8bf
commit abc4af43b3
10 changed files with 180 additions and 254 deletions

View File

@@ -15,3 +15,4 @@
<?= raw($page) ?>
</html>

View File

@@ -0,0 +1,43 @@
<section>
<p class="exception-message">
<?= e($message ?? '') ?>
</p>
<?php if (isset($stacktrace)): ?>
<?php foreach ($stacktrace as $frame): ?>
<code>
<?= e($frame) ?>
</code>
<br>
<?php endforeach; ?>
<?php endif; ?>
<br>
<p>
Query string: <?= e($_SERVER['QUERY_STRING'] ?? '') ?>
</p>
<p>
Version: <?= e(Configuration::getVersion()) ?>
</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>
</a>
<a href="<?= raw($issueUrl) ?>" title="After clicking this button you can review the issue before submitting it">
<button>Open GitHub Issue</button>
</a>
<p class="maintainer"><?= e($bridge->getMaintainer()) ?></p>
</section>

View File

@@ -1,9 +1,19 @@
<section>
<h2>Something went wrong</h2>
<div style="width: 60%; margin: 30px auto">
<h1>Something went wrong</h1>
<br>
<?= e($message) ?>
<br>
<br>
<p>
<?= e($message) ?>
</p>
<?php if (isset($stacktrace)): ?>
<?php foreach ($stacktrace as $frame) : ?>
<code>
<?= e($frame) ?>
</code>
<br>
<?php endforeach; ?>
<?php endif; ?>
</div>
</section>