Skip to content

Commit fb1afe3

Browse files
committed
Output errno on error (helps debugging)
1 parent 4809fdc commit fb1afe3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cobc/gentable.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ gentable (FILE *stream, const char *code_ebcdic, const char *code_ascii, char re
8787
--ascii_size;
8888
++nb_irreversible;
8989
} else {
90-
cb_error (_("an error occurred after converting %ld characters"),
91-
(ebcdic_ptr - ebcdic));
90+
cb_error (_("an error occurred after converting %ld characters (%d, %ld)"),
91+
(ebcdic_ptr - ebcdic),
92+
errno, res);
9293
iconv_close (ic);
9394
return -1;
9495
}

0 commit comments

Comments
 (0)