WSL/SLF GitLab Repository

Commit f83168a7 authored by Nander Wever's avatar Nander Wever
Browse files

Improving the previous commit: the text of the error message now correctly...

Improving the previous commit: the text of the error message now correctly mentions ISWR, TA and RH. The error message was also at an unreachable location, since the previous if-statement would already trigger a throw.
parent 333d94e3
......@@ -217,13 +217,10 @@ void MeteoObj::checkInputsRequirements(std::vector<MeteoData>& vecData)
}
}
if ( nb_ta==0 || nb_rh==0 || nb_ilwr==0 || nb_iswr==0 || nb_iswr_ta_rh==0) {
if ( nb_ta==0 || nb_rh==0 || nb_ilwr==0 || nb_iswr==0 || nb_iswr_ta_rh==0 ) {
printf("nb(ta)=%d nb(rh)=%d nb(ilwr)=%d nb(iswr)=%d\n",nb_ta, nb_rh, nb_ilwr, nb_iswr);
throw IOException("Not enough input meteo data on "+vecData[0].date.toString(Date::ISO), AT);
}
if ( nb_iswr_ta_rh==0 ) {
cout << "[e] For short wave radiation calculation, at least one set of both TA and ILWR are needed at the same station!\n";
throw IOException("Not enough input meteo data", AT);
if ( nb_iswr_ta_rh==0 ) cout << "[e] For short wave radiation calculation, at least one set of both TA, RH and ISWR are needed at the same station!\n";
throw IOException("Not enough input meteo data on "+vecData[0].date.toString(Date::ISO), AT);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment