seitime-frappe/frappe/www/error.py
2019-03-19 20:34:19 +05:30

12 lines
380 B
Python

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