only:Improve error message so user knows what to check and fix #5335
This commit is contained in:
parent
96d6943fd5
commit
5802e0acc6
|
@ -88,8 +88,10 @@ static void runCanGpioTest() {
|
||||||
|
|
||||||
static void writeSimulatorTune() {
|
static void writeSimulatorTune() {
|
||||||
FILE *ptr = fopen(SIMULATOR_TUNE_BIN_FILE_NAME, "wb");
|
FILE *ptr = fopen(SIMULATOR_TUNE_BIN_FILE_NAME, "wb");
|
||||||
if (ptr == nullptr)
|
if (ptr == nullptr) {
|
||||||
throw std::logic_error("Error opening file maybe folder needs to be created?");
|
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);
|
fwrite(&persistentState.persistentConfiguration, 1, sizeof(persistentState.persistentConfiguration), ptr);
|
||||||
fclose(ptr);
|
fclose(ptr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue