Files
sqlpage--sqlpage/sqlpage/templates/error.handlebars
lovasoa 637f198b57 error handling: improve visual presentation of error messages
- Updated error messages to be more user-friendly and visually appealing in the browser.
- Introduced a new method for retrieving static files from the cache.
- Improved error reporting for invalid UTF-8 encoding in SQL files.
2025-08-30 17:16:13 +02:00

32 lines
1.1 KiB
Handlebars

<div class="alert alert-danger mt-2" role="alert">
<div class="alert-icon">
{{icon_img 'alert-hexagon'}}
</div>
<div class="overflow-auto w-100">
<h4 class="alert-title">
{{#if query_number}}
Error in query number <strong>{{query_number}}</strong>
{{else}}
An error occurred
{{/if}}
</h4>
<div class="text-muted">
<p>We are sorry, but an error occurred while generating this page. You should contact the site's
administrator.</p>
{{~#if description~}}
<pre class="mt-2"><code class="sqlpage-error-description">{{description}}</code></pre>
{{~/if~}}
{{#if backtrace}}
<details class="mt-2" open>
<summary>Backtrace</summary>
{{~#each backtrace~}}
<pre class="fs-6 mt-1 p-1 my-1"><code>{{this}}</code></pre>
{{~/each~}}
</details>
{{/if}}
{{#if note}}
<p class="fs-6 mt-1 p-1 my-1"><strong>Note:</strong> {{note}}</p>
{{/if}}
</div>
</div>
</div>