aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-10-04 11:20:44 +0300
committerFrederick Muriuki Muriithi2022-10-04 11:20:44 +0300
commit14a2b4012c381f548ed8c3a4f32dff6cb9e5af84 (patch)
treee50db2ed5bea7e8521d5d37c843e31f48f1962bb /wqflask
parent53aa084fd2c9c930ac791ee43affffb3f788547c (diff)
downloadgenenetwork2-14a2b4012c381f548ed8c3a4f32dff6cb9e5af84.tar.gz
Add more information to exception to help in debugging
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/base/trait.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 888b9a9c..f8262203 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -596,6 +596,7 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False):
if str(trait.lrs or "") != "":
trait.LRS_score_repr = LRS_score_repr = '%3.1f' % trait.lrs
else:
- raise KeyError(repr(trait.name)
- + ' information is not found in the database.')
+ raise KeyError(
+ f"{repr(trait.name)} information is not found in the database "
+ f"for dataset '{dataset.name}' with id '{dataset.id}'.")
return trait