From 98fbdf77cb7af6d49bbd981765ac84824fe114c2 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 20 Dec 2019 20:21:29 -0800 Subject: Add custom 500 error page. Display the traceback. Center and format error page in general. Also add a link to github for reporting the exception. --- youtube/templates/error.html | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'youtube/templates') diff --git a/youtube/templates/error.html b/youtube/templates/error.html index e77c92c..27b68ff 100644 --- a/youtube/templates/error.html +++ b/youtube/templates/error.html @@ -1,7 +1,40 @@ {% set page_title = 'Error' %} {% extends "base.html" %} +{% block style %} + h1{ + font-size: 32px; + font-weight: normal; + } + #error-box, #error-message{ + background-color: var(--interface-color); + width: 80%; + margin: auto; + margin-top: 20px; + padding: 5px; + } + #error-box > div, #error-box > p, #error-box > h1{ + white-space: pre-wrap; + margin-bottom: 10px; + } + .code-box{ + padding: 5px; + border-style:solid; + border-width:1px; + border-radius:5px; + } +{% endblock style %} + {% block main %} - {{ error_message }} + {% if traceback %} +
+

500 Uncaught exception:

+
{{ traceback }}
+

Please report this issue at https://github.com/user234683/youtube-local/issues

+

Remember to include the traceback in your issue and redact any information in it you do not want to share

+
+ {% else %} +
{{ error_message }}
+ {% endif %} {% endblock %} -- cgit v1.2.3