Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions FileContentsServerApp/src/FileContentsServerDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <math.h>
#include <exception>
#include <iostream>
#include <format>
#include <map>
#include <list>
#include <vector>
Expand Down Expand Up @@ -117,7 +116,7 @@ asynStatus FileContentsServerDriver::saveFile()
}
else
{
logMessage(std::format("Failed to open file ({}) for writing", fullFileName));
logMessage(std::string("Failed to open file (") + fullFileName + ") for writing");
return asynError;
}
}
Expand Down Expand Up @@ -191,7 +190,7 @@ void FileContentsServerDriver::readFile()
getStringParam(P_inputFileName, fileName);
std::string fullFileName = m_fileDir + "/" + fileName;

logMessage(std::format("Reading file {}", fullFileName));
logMessage(std::string("Reading file ") + fullFileName);
try
{
f.open(fullFileName, std::ios::binary);
Expand All @@ -201,12 +200,12 @@ void FileContentsServerDriver::readFile()
setStringParam(P_fileContents, "");
if (errno == ENOENT) // File not found
{
logMessage(std::format("File not found: {}", fullFileName));
logMessage(std::string("File not found: ") + fullFileName);
throw std::runtime_error("File not found");
}
else // Other errors, e.g., permission denied
{
logMessage(std::format("Unable to open file: {}, error {}", fullFileName, std::string(strerror(errno))));
logMessage(std::string("Unable to open file: ") + fullFileName + ", error " + std::string(strerror(errno)));
throw std::runtime_error(std::string("Unable to open file: ") + std::string(strerror(errno)));
}
}
Expand Down
2 changes: 0 additions & 2 deletions FileContentsServerApp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ include $(TOP)/configure/CONFIG
#=============================

USR_INCLUDES += -I"$(TOP)/../../libraries/boost/include"
#USR_CXXFLAGS += /EHa /DNOMINMAX
USR_CXXFLAGS += /std:c++20

LIBRARY_IOC += FileContentsServer
FileContentsServer_SRCS += FileContentsServerDriver.cpp
Expand Down