mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-18 05:58:20 +01:00
Fix error views on app bootstrap
This commit is contained in:
parent
e9b14b8439
commit
fd7b9bc218
@ -2,4 +2,7 @@
|
||||
<h2>Oops, something went wrong!</h2>
|
||||
<p>Formwork encountered an error while serving your request.<br>If you are the maintainer of this site, please check Formwork configuration or the server log for errors.</p>
|
||||
<p><a href="https://github.com/getformwork/formwork/issues" target="_blank">Report an issue to GitHub</a></p>
|
||||
<?php if ($throwable && $app->config()->get('system.debug.enabled', false)) : ?>
|
||||
<?php $this->insert('errors.partials.debug') ?>
|
||||
<?php endif ?>
|
||||
<?php $this->insert('errors.partials.footer') ?>
|
@ -1,17 +1,15 @@
|
||||
<?php if ($app->config()->get('system.debug.enabled', false) && $throwable) : ?>
|
||||
<div class="error-debug-details">
|
||||
<h3>Uncaught <code><?= $throwable::class ?></code>: <?= $throwable->getMessage() ?></h3>
|
||||
<details open>
|
||||
<summary><a class="error-debug-editor-uri" href="<?= Formwork\Utils\Str::interpolate($app->config()->get('system.debug.editorUri'), ['filename' => $throwable->getFile(), 'line' => $throwable->getLine()]) ?>"><span class="error-debug-filename"><?= preg_replace('/([^\/]+)$/', '<strong>$1</strong>', $throwable->getFile()) ?></span><span class="error-debug-line">:<?= $throwable->getLine() ?></span></a></summary>
|
||||
<?= Formwork\Utils\CodeDumper::dumpLine($throwable->getFile(), $throwable->getLine(), $app->config()->get('system.debug.contextLines', 5)) ?>
|
||||
</details>
|
||||
<?php foreach ($throwable->getTrace() as $trace) : ?>
|
||||
<?php if (isset($trace['file'], $trace['line']) && $trace['file'] !== $throwable->getFile() && $trace['line'] !== $throwable->getLine()) : ?>
|
||||
<details>
|
||||
<summary><a class="error-debug-editor-uri" href="<?= Formwork\Utils\Str::interpolate($app->config()->get('system.debug.editorUri'), ['filename' => $trace['file'], 'line' => $trace['line']]) ?>"><span class="error-debug-filename"><?= preg_replace('/([^\/]+)$/', '<strong>$1</strong>', $trace['file']) ?></span><span class="error-debug-line">:<?= $trace['line'] ?></span></a></summary>
|
||||
<?= Formwork\Utils\CodeDumper::dumpLine($trace['file'], $trace['line'], $app->config()->get('system.debug.contextLines', 5)) ?>
|
||||
</details>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="error-debug-details">
|
||||
<h3>Uncaught <code><?= $throwable::class ?></code>: <?= $throwable->getMessage() ?></h3>
|
||||
<details open>
|
||||
<summary><a class="error-debug-editor-uri" href="<?= Formwork\Utils\Str::interpolate($app->config()->get('system.debug.editorUri'), ['filename' => $throwable->getFile(), 'line' => $throwable->getLine()]) ?>"><span class="error-debug-filename"><?= preg_replace('/([^\/]+)$/', '<strong>$1</strong>', $throwable->getFile()) ?></span><span class="error-debug-line">:<?= $throwable->getLine() ?></span></a></summary>
|
||||
<?= Formwork\Utils\CodeDumper::dumpLine($throwable->getFile(), $throwable->getLine(), $app->config()->get('system.debug.contextLines', 5)) ?>
|
||||
</details>
|
||||
<?php foreach ($throwable->getTrace() as $trace) : ?>
|
||||
<?php if (isset($trace['file'], $trace['line']) && $trace['file'] !== $throwable->getFile() && $trace['line'] !== $throwable->getLine()) : ?>
|
||||
<details>
|
||||
<summary><a class="error-debug-editor-uri" href="<?= Formwork\Utils\Str::interpolate($app->config()->get('system.debug.editorUri'), ['filename' => $trace['file'], 'line' => $trace['line']]) ?>"><span class="error-debug-filename"><?= preg_replace('/([^\/]+)$/', '<strong>$1</strong>', $trace['file']) ?></span><span class="error-debug-line">:<?= $trace['line'] ?></span></a></summary>
|
||||
<?= Formwork\Utils\CodeDumper::dumpLine($trace['file'], $trace['line'], $app->config()->get('system.debug.contextLines', 5)) ?>
|
||||
</details>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
@ -1,5 +1,4 @@
|
||||
</div>
|
||||
<?php $this->insert('errors.partials.debug') ?>
|
||||
</body>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user