diff --git a/common/ResolutionShells.cpp b/common/ResolutionShells.cpp index 9a9643fa..828a64c7 100644 --- a/common/ResolutionShells.cpp +++ b/common/ResolutionShells.cpp @@ -12,8 +12,10 @@ ResolutionShells::ResolutionShells(float d_min, float d_max, int32_t nshells) one_over_dmin2(1 / (d_min * d_min)), one_over_dmax2(1 / (d_max * d_max)), nshells(nshells) { - if (d_min >= d_max || d_min < 0) - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Wrong resolution range"); + if (d_min <= 0) + throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Resolution must be above zero"); + if (d_min >= d_max) + throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Reversed resolution bounds"); if (nshells <= 0) throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,