Commit e4e1a5e3 authored by Julian Rother's avatar Julian Rother
Browse files

Added default error page without much content (#61)

parent 899d4065
......@@ -8,6 +8,7 @@ import sys
import hashlib
import random
import sched
import traceback
app = Flask(__name__)
......@@ -172,6 +173,12 @@ def handle_errors(endpoint, text, code, *errors, **epargs):
def handle_not_found(e):
return render_endpoint('index', 'Diese Seite existiert nicht!'), 404
@app.errorhandler(500)
@app.errorhandler(Exception)
def handle_internal_error(e):
traceback.print_exc()
return render_template('500.html')
# debian ships jinja2 without this test...
@app.template_test(name='equalto')
def equalto(a,b):
......
{% extends "base.html" %}
{% block content %}
<div class="panel panel-danger">
<div class="panel-heading">
<h1 class="panel-title">Interner Fehler (500)</h1>
</div>
<div class="row panel-body">
<div class="col-xs-12">
Es ist ein Fehler aufgetreten.
</div>
</div>
</div>
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment