mirror of https://github.com/ecmwf/eccodes.git
Tools: Error messages
This commit is contained in:
parent
78aa519961
commit
9c693eabab
|
@ -86,7 +86,7 @@ int grib_tool_new_filename_action(grib_runtime_options* options, const char* fil
|
|||
printf("--- %s: processing %s\n", tool_name, file);
|
||||
ret = grib_index_add_file(idx, file);
|
||||
if (ret) {
|
||||
printf("error: %s\n", grib_get_error_message(ret));
|
||||
fprintf(stderr, "Error: %s\n", grib_get_error_message(ret));
|
||||
exit(ret);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -75,6 +75,7 @@ int main(int argc, char* argv[])
|
|||
fout = fopen(out_file, "wb");
|
||||
if (!fout) {
|
||||
fprintf(stderr, "Failed to open output file '%s'\n", out_file);
|
||||
perror(out_file);
|
||||
return 1;
|
||||
}
|
||||
fin = codes_fopen(full_path, "r");
|
||||
|
|
|
@ -83,7 +83,7 @@ int grib_tool_new_filename_action(grib_runtime_options* options, const char* fil
|
|||
printf("--- %s: processing %s\n", tool_name, file);
|
||||
ret = grib_index_add_file(idx, file);
|
||||
if (ret) {
|
||||
printf("error: %s\n", grib_get_error_message(ret));
|
||||
fprintf(stderr, "Error: %s\n", grib_get_error_message(ret));
|
||||
exit(ret);
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue