diff options
author | zsloan | 2020-02-21 12:28:46 -0600 |
---|---|---|
committer | zsloan | 2020-02-21 12:28:46 -0600 |
commit | f81419a641172e81e2a1ec1e38e626baeb12bd90 (patch) | |
tree | 06619b6e99261b7a47d6d37f9a495dac632f2ed8 /wqflask | |
parent | e7425fb74724a8ee3965cc0e588bad9aff335487 (diff) | |
download | genenetwork2-f81419a641172e81e2a1ec1e38e626baeb12bd90.tar.gz |
Added try/except to mapping just to intercept all possible errors and give a nicer error page
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/views.py | 10 |
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, |