seitime-frappe/frappe/www/error.py

12 lines
356 B
Python

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
import frappe
no_cache = 1
def get_context(context):
if frappe.flags.in_migrate: return
context.http_status_code = 500
print(frappe.get_traceback().encode("utf-8"))
return {"error": frappe.get_traceback().replace("<", "&lt;").replace(">", "&gt;") }