diff options
| author | Pjotr Prins | 2017-08-28 09:18:42 +0000 |
|---|---|---|
| committer | Pjotr Prins | 2017-08-28 09:18:42 +0000 |
| commit | ffc99d62013b1a5025b21cc385dd9892360ebe49 (patch) | |
| tree | f38ff3e667c4061b41375b5aed42b885285e2d29 | |
| parent | 9b08127add884d8f9cf61b87b5c3706433e27dd6 (diff) | |
| download | pangemma-ffc99d62013b1a5025b21cc385dd9892360ebe49.tar.gz | |
param.cpp: Set error on error
| -rw-r--r-- | src/param.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/param.cpp b/src/param.cpp index dce55e0..3b319e9 100644 --- a/src/param.cpp +++ b/src/param.cpp @@ -350,6 +350,7 @@ void PARAM::ReadFiles(void) { igzstream infile(file_mbfile.c_str(), igzstream::in); if (!infile) { cout << "error! fail to open mbfile file: " << file_mbfile << endl; + error = true; return; } @@ -437,6 +438,7 @@ void PARAM::ReadFiles(void) { igzstream infile(file_mgeno.c_str(), igzstream::in); if (!infile) { cout << "error! fail to open mgeno file: " << file_mgeno << endl; + error = true; return; } @@ -504,8 +506,8 @@ void PARAM::ReadFiles(void) { } if (ni_test == 0) { - error = true; cout << "error! number of analyzed individuals equals 0. " << endl; + error = true; return; } } |
