Browse Source

show error message on 505

version-14
Rushabh Mehta 11 years ago
parent
commit
1ae1b23e11
2 changed files with 5 additions and 2 deletions
  1. +1
    -1
      frappe/__init__.py
  2. +4
    -1
      frappe/app.py

+ 1
- 1
frappe/__init__.py View File

@@ -557,7 +557,7 @@ def respond_as_web_page(title, html, success=None, http_status_code=None):
local.message = html
local.message_success = success
local.response['type'] = 'page'
local.response['page_name'] = 'message.html'
local.response['page_name'] = 'message'
if http_status_code:
local.response['http_status_code'] = http_status_code



+ 4
- 1
frappe/app.py View File

@@ -67,7 +67,10 @@ def application(request):
if frappe.local.is_ajax:
response = frappe.utils.response.report_error(getattr(e, "http_status_code", 500))
else:
response = frappe.website.render.render(getattr(e, "http_status_code", 500))
frappe.respond_as_web_page("Server Error",
"<pre>"+frappe.get_traceback()+"</pre>",
http_status_code=getattr(e, "http_status_code", 500))
response = frappe.website.render.render("message")

if e.__class__ == frappe.AuthenticationError:
if hasattr(frappe.local, "login_manager"):


Loading…
Cancel
Save