diff --git a/himan-plugins/source/hitool.cpp b/himan-plugins/source/hitool.cpp index 439be578..dc7efd17 100644 --- a/himan-plugins/source/hitool.cpp +++ b/himan-plugins/source/hitool.cpp @@ -321,7 +321,7 @@ vector hitool::VerticalExtremeValue(shared_ptr mod, const params& w auto _par = GetCachedParamName(par); ret = VerticalExtremeValue(mod, _par, lowerHeight, upperHeight, findValue); UpdateCachedParamName(wantedParams, _par); - return ret; + break; } catch (const HPExceptionType& e) { @@ -336,6 +336,11 @@ vector hitool::VerticalExtremeValue(shared_ptr mod, const params& w } } + if (ret.empty()) + { + itsLogger.Error("No data found for any of the parameters"); + throw kFileDataNotFound; + } return ret; }