From cd22a6554a8c6d917306304aeaf5d2b7a9d99ae4 Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Mon, 9 Nov 2015 18:02:41 +0200 Subject: [PATCH 1/1] Ticket 12. The if (settings->GetStopOnError()) check and displays error users in depending on the result added in the ReadUsers() method. --- projects/stargazer/users_impl.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/projects/stargazer/users_impl.cpp b/projects/stargazer/users_impl.cpp index 14c44604..70a079bf 100644 --- a/projects/stargazer/users_impl.cpp +++ b/projects/stargazer/users_impl.cpp @@ -355,11 +355,21 @@ for (unsigned int i = 0; i < usersList.size(); i++) AddUserIntoIndexes(ui); - if (ui->ReadConf() < 0) - errors++; - - if (ui->ReadStat() < 0) - errors++; + if (settings->GetStopOnError()) + { + if (ui->ReadConf() < 0) + return -1; + + if (ui->ReadStat() < 0) + return -1; + } else + { + if (ui->ReadConf() < 0) + errors++; + + if (ui->ReadStat() < 0) + errors++; + } } if (errors > 0) -- 2.44.2