summaryrefslogtreecommitdiff
path: root/src/file/mail.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/file/mail.cpp')
-rw-r--r--src/file/mail.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file/mail.cpp b/src/file/mail.cpp
index 1516880..96d760b 100644
--- a/src/file/mail.cpp
+++ b/src/file/mail.cpp
@@ -1,6 +1,7 @@
#include <fstream>
#include "mail.hpp"
+#include "managment/logger.hpp"
namespace smtp::file
{
@@ -14,8 +15,8 @@ namespace smtp::file
std::ifstream mail_file{ mPathFile, std::fstream::in };
if ( !mail_file.is_open() )
{
- //TODO new file
- // std::cerr << "Failed to open pcie_devices database \n";
+ manage::Logger::LogError( "Unable to open file to read " + mPathFile );
+ return {};
}
std::string line{};
manage::MailsSet result;
@@ -37,8 +38,7 @@ namespace smtp::file
std::ofstream mail_file{ mPathFile, std::fstream::out | std::fstream::trunc };
if ( !mail_file.is_open() )
{
- //TODO new file
- // std::cerr << "Failed to open pcie_devices database \n";
+ manage::Logger::LogError( "Unable to open file to write " + mPathFile );
return false;
}
for( const auto& pair : data )