mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-04 11:15:39 +00:00
Handle processing errors appropriately
Alter the return status accordingly, and print the error counts on exit
This commit is contained in:
1 parent
ef473de75a
commit
1da884db15
1 file changed
+6
-1
+6
-1
@@ -706,7 +706,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
// Do not do anything if option parsing went wrong
|
||||
if (nbErrors) {
|
||||
return 0;
|
||||
fprintf(stderr, "Conversion aborted after %ju error%s\n", nbErrors, nbErrors == 1 ? "" : "s");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (options.reverse()) {
|
||||
@@ -715,6 +716,10 @@ int main(int argc, char *argv[]) {
|
||||
process();
|
||||
}
|
||||
|
||||
if (nbErrors) {
|
||||
fprintf(stderr, "Conversion aborted after %ju error%s\n", nbErrors, nbErrors == 1 ? "" : "s");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user