From cf4b82a7c8ab83bc3f75c252f246f82581efd4db Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 5 Aug 2024 10:29:11 +0200 Subject: [PATCH] improve generator logging --- src/include/options-generator.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/include/options-generator.c b/src/include/options-generator.c index 68fd9d5d..cf3da24e 100644 --- a/src/include/options-generator.c +++ b/src/include/options-generator.c @@ -714,8 +714,9 @@ main (int argc, if (NULL == f) { fprintf (stderr, - "Failed to open %s\n", - fn); + "Failed to open %s: %s\n", + fn, + strerror (errno)); free (fn); return 2; } @@ -976,8 +977,9 @@ TOP: if (NULL == f) { fprintf (stderr, - "Failed to open `%s'\n", - doc_in); + "Failed to open `%s': %s\n", + doc_in, + strerror (errno)); return 2; } fprintf (f, @@ -1006,8 +1008,9 @@ TOP: if (NULL == f) { fprintf (stderr, - "Failed to open `%s'\n", - so_c); + "Failed to open `%s': %s\n", + so_c, + strerror (errno)); return 2; } fprintf (f, @@ -1144,8 +1147,9 @@ TOP: if (NULL == f) { fprintf (stderr, - "Failed to open `%s'\n", - do_h); + "Failed to open `%s': %s\n", + do_h, + strerror (errno)); return 2; } fprintf (f,