Report diagnostics from libconfig when parsing fails.
This commit is contained in:
@@ -403,6 +403,8 @@ libmegapixels_load_file(libmegapixels_devconfig *config, const char *file)
|
||||
config_init(&cfg);
|
||||
if (!config_read_file(&cfg, file)) {
|
||||
fprintf(stderr, "Could not read %s\n", file);
|
||||
fprintf(stderr, "%s:%d - %s\n",
|
||||
config_error_file(&cfg), config_error_line(&cfg), config_error_text(&cfg));
|
||||
config_destroy(&cfg);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user