From 0e220eaa56d5b1947e6bead8e5695446ab102fba Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 14 Sep 2025 01:26:00 -0400 Subject: simplify error-to-string interface --- examples/read_conf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'examples/read_conf.c') diff --git a/examples/read_conf.c b/examples/read_conf.c index 54a1e86..18802e3 100644 --- a/examples/read_conf.c +++ b/examples/read_conf.c @@ -8,12 +8,7 @@ int main(int argc, char **argv) { pom_error *error; pom_conf *conf = pom_load_path(argc >= 2 ? argv[1] : "conf.pom", &error); if (!conf) { - char *string = pom_error_to_string(error); - for (char *s=string; *s; s++) - if (*s >= 'a' && *s <= 'z') - *s += 'A' - 'a'; - printf("%s\n",string); - free(string); + pom_error_print(error); free(error); return EXIT_FAILURE; } -- cgit v1.2.3