error500.ut 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {#
  2. Copyright 2022 Jo-Philipp Wich <jo@mein.io>
  3. Licensed to the public under the Apache License 2.0.
  4. -#}
  5. <!--]]>--><!--'>--><!--">-->
  6. <style>
  7. body {
  8. line-height: 1.5;
  9. font-size: 14px;
  10. font-family: sans-serif;
  11. }
  12. .error500 * {
  13. margin: 0;
  14. padding: 0;
  15. color: inherit;
  16. }
  17. .error500 {
  18. box-sizing: border-box;
  19. position: fixed;
  20. z-index: 999999;
  21. top: 0;
  22. left: 0;
  23. width: 100vw;
  24. height: 100vh;
  25. overflow: auto;
  26. background: #ffe;
  27. color: #f00 !important;
  28. padding: 1em;
  29. }
  30. .error500 h1 {
  31. margin-bottom: .5em;
  32. }
  33. .error500 .exception {
  34. font-weight: normal;
  35. white-space: normal;
  36. margin: .25em;
  37. padding: .5em;
  38. border: 1px solid #f00;
  39. background: rgba(204, 204, 204, .2);
  40. }
  41. .error500 .message {
  42. font-weight: bold;
  43. white-space: pre-line;
  44. }
  45. .error500 .context {
  46. margin-top: 2em;
  47. }
  48. </style>
  49. <div class="error500">
  50. <h1>{{ title }}</h1>
  51. <div class="message">{{ message }}</div>
  52. {% if (exception): %}
  53. <div class="exception">
  54. <div class="message">{{ exception.message }}</div>
  55. <pre class="context">{{ exception.stacktrace[0].context }}</pre>
  56. </div>
  57. {% endif %}
  58. </div>