Commit 8d178606 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

conv/many [FEATURE]: let anyextract make plausibility check

anyextract did not check plausibility of selected time window. Let the
program abort with an error message, if time window is empty.
parent 038919c6
......@@ -70,6 +70,7 @@
* in situations where a completeness analysis is done
* on data on staggered sampling rasters
* - 07/11/2014 V1.25 properly report meaning of gap messages
* - 12/11/2020 V1.26 add plausibility test for selected time window
*
* TODO:
* * properly handle cases in which the output format can take only single
......@@ -82,7 +83,7 @@
*/
#define ANYEXTRACT_VERSION \
"ANYEXTRACT V1.25 extract data files, using index file"
"ANYEXTRACT V1.26 extract data files, using index file"
#include <fstream>
#include <iostream>
......@@ -794,6 +795,13 @@ int main(int iargc, char* argv[])
<< " of sampling interval" << endl;
}
// plausibility test
if (opt.lastset && opt.firstset)
{
TFXX_assert(opt.first<opt.last,
"ERROR: selected time window makes no sense!");
}
// prepare regular expressions
SelectionRegexx rgxx;
rgxx.station.expression(opt.selstation);
......
Markdown is supported
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