From 14a2b4012c381f548ed8c3a4f32dff6cb9e5af84 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 4 Oct 2022 11:20:44 +0300 Subject: Add more information to exception to help in debugging --- wqflask/base/trait.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'wqflask/base/trait.py') 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 -- cgit v1.2.3