We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8fdbdb commit edbd07aCopy full SHA for edbd07a
src/training/lstmtraining.cpp
@@ -89,7 +89,11 @@ int main(int argc, char **argv) {
89
FILE* f = fopen(test_file.c_str(), "wb");
90
if (f != nullptr) {
91
fclose(f);
92
- remove(test_file.c_str());
+ if (remove(test_file.c_str()) != 0) {
93
+ tprintf("Error, failed to remove %s: %s\n",
94
+ test_file.c_str(), strerror(errno));
95
+ return EXIT_FAILURE;
96
+ }
97
} else {
98
tprintf("Error, model output cannot be written: %s\n", strerror(errno));
99
return EXIT_FAILURE;
0 commit comments