From 3b7df0d88757fd1decb28b2a6290bb94cb74940d Mon Sep 17 00:00:00 2001 From: Pavel Odintsov Date: Mon, 3 Apr 2023 21:06:56 +0100 Subject: [PATCH] Fixed error reporting for fastnetmon_client --- src/fastnetmon_client.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/fastnetmon_client.cpp b/src/fastnetmon_client.cpp index 2ab617a..ab414c4 100644 --- a/src/fastnetmon_client.cpp +++ b/src/fastnetmon_client.cpp @@ -90,7 +90,13 @@ int main(int argc, char** argv) { reading_file.open(cli_stats_file_path.c_str(), std::ifstream::in); if (!reading_file.is_open()) { - std::cout << "Can't open fastnetmon stats file: " << cli_stats_file_path; + std::string error_message = "Can't open fastnetmon stats file: " + cli_stats_file_path; + + addstr(error_message.c_str()); + + // update screen + refresh(); + continue; } std::string line = "";