aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-02-21 12:28:46 -0600
committerzsloan2020-02-21 12:28:46 -0600
commitf81419a641172e81e2a1ec1e38e626baeb12bd90 (patch)
tree06619b6e99261b7a47d6d37f9a495dac632f2ed8
parente7425fb74724a8ee3965cc0e588bad9aff335487 (diff)
downloadgenenetwork2-f81419a641172e81e2a1ec1e38e626baeb12bd90.tar.gz
Added try/except to mapping just to intercept all possible errors and give a nicer error page
-rw-r--r--wqflask/wqflask/views.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 7826c98f..90fd798d 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -675,10 +675,12 @@ def mapping_results_page():
else:
logger.info("Cache miss!!!")
with Bench("Total time in RunMapping"):
- template_vars = run_mapping.RunMapping(start_vars, temp_uuid)
-
- if template_vars.no_results:
- rendered_template = render_template("mapping_error.html")
+ try:
+ template_vars = run_mapping.RunMapping(start_vars, temp_uuid)
+ if template_vars.no_results:
+ rendered_template = render_template("mapping_error.html")
+ except:
+ rendered_template = render_template("mapping_error.html")
else:
#if template_vars.mapping_method != "gemma" and template_vars.mapping_method != "plink":
template_vars.js_data = json.dumps(template_vars.js_data,