From ffc99d62013b1a5025b21cc385dd9892360ebe49 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 28 Aug 2017 09:18:42 +0000 Subject: param.cpp: Set error on error --- src/param.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } } -- cgit v1.2.3