only:Improve error message so user knows what to check and fix #5335

This commit is contained in:
rusefillc 2023-06-17 13:43:21 -04:00
parent 96d6943fd5
commit 5802e0acc6
1 changed files with 4 additions and 2 deletions

View File

@ -88,8 +88,10 @@ static void runCanGpioTest() {
static void writeSimulatorTune() {
FILE *ptr = fopen(SIMULATOR_TUNE_BIN_FILE_NAME, "wb");
if (ptr == nullptr)
throw std::logic_error("Error opening file maybe folder needs to be created?");
if (ptr == nullptr) {
printf("ERROR creating file maybe folder needs to be created? [%s]", SIMULATOR_TUNE_BIN_FILE_NAME);
return;
}
fwrite(&persistentState.persistentConfiguration, 1, sizeof(persistentState.persistentConfiguration), ptr);
fclose(ptr);
}