diff options
Diffstat (limited to 'wqflask/wqflask/correlation/exceptions.py')
-rw-r--r-- | wqflask/wqflask/correlation/exceptions.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/wqflask/wqflask/correlation/exceptions.py b/wqflask/wqflask/correlation/exceptions.py new file mode 100644 index 00000000..8e9c8516 --- /dev/null +++ b/wqflask/wqflask/correlation/exceptions.py @@ -0,0 +1,12 @@ +"""Correlation-Specific Exceptions""" + +class WrongCorrelationType(Exception): + """Raised when a correlation is requested for incompatible datasets.""" + + def __init__(self, trait, target_dataset, corr_method): + message = ( + f"It is not possible to compute the '{corr_method}' correlations " + f"between trait '{trait.name}' and the data in the " + f"'{target_dataset.fullname}' dataset. " + "Please try again after selecting another type of correlation.") + super().__init__(message) |