default filepath is now an empty string, SetupWriter will throw an error if path not set (#1133)

Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
This commit is contained in:
mazzol_aandmaliakal_d authored and GitHub committed 2025-03-10 12:00:22 +01:00
1 parent b9b4f1ae35
commit fa504e6675
2 files changed
+6 -1

No files matched your search

@@ -919,7 +919,12 @@ void Implementation::CreateUDPSockets() {
}
void Implementation::SetupWriter() {
try {
//check if filePath empty and throw error
if(filePath.empty()){
throw ReceiverError("File path cannot be empty");
}
// check if folder exists and throw if it cant create
mkdir_p(filePath);
// create first files
+1 -1
View File
@@ -314,7 +314,7 @@ class Implementation : private virtual slsDetectorDefs {
// file parameters
fileFormat fileFormatType{BINARY};
std::string filePath{"/"};
std::string filePath{};
std::string fileName{"run"};
uint64_t fileIndex{0};
bool fileWriteEnable{false};