nicer exception handling
[pharext/pharext.org] / app / views / alert.phtml
1
2 <div class="alert alert-danger" role="alert">
3 <strong><?= nl2br($this->e($exception->getMessage())) ?></strong><br>
4 <?php if ($exception instanceof \app\Github\Exception\TokenException) : ?>
5 You might want to try to <a href="<?= $baseUrl->mod("./github/signin") ?>">renew your token</a>!
6 <?php endif; ?>
7 <?php if ($exception instanceof \app\Github\Exception\StateException) : ?>
8 You might want to try to <a href="<?= $baseUrl->mod("./github/signin") ?>">try again</a>!
9 <?php endif; ?>
10 </div>
11
12 <?php if (APP_ENVIRONMENT != "production") : ?>
13 <h3>Stack Trace</h3>
14 <pre><?= $this->e($exception->getTraceAsString()) ?></pre>
15 <?php endif; ?>