Merge pull request #388 from dod-ccpo/raise-error-in-debug-mode
Raise unhandled exception in debug mode
This commit is contained in:
commit
e7b437dc56
@ -1,4 +1,4 @@
|
|||||||
from flask import render_template
|
from flask import render_template, current_app
|
||||||
import werkzeug.exceptions as werkzeug_exceptions
|
import werkzeug.exceptions as werkzeug_exceptions
|
||||||
|
|
||||||
import atst.domain.exceptions as exceptions
|
import atst.domain.exceptions as exceptions
|
||||||
@ -27,6 +27,8 @@ def make_error_pages(app):
|
|||||||
# pylint: disable=unused-variable
|
# pylint: disable=unused-variable
|
||||||
def exception(e):
|
def exception(e):
|
||||||
log_error(e)
|
log_error(e)
|
||||||
|
if current_app.debug:
|
||||||
|
raise e
|
||||||
return (
|
return (
|
||||||
render_template("error.html", message="An Unexpected Error Occurred"),
|
render_template("error.html", message="An Unexpected Error Occurred"),
|
||||||
500,
|
500,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user