Skip to content

Commit 3da8943

Browse files
ben-schwenaitap
andauthored
add strerrors
Co-authored-by: aitap <[email protected]>
1 parent 9b3c387 commit 3da8943

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/freadR.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ INTERNAL_STOP(_("spillConnectionToFile: unexpected R_CONNECTIONS_VERSION = %d",
766766

767767
FILE *outfile = fopen(filepath, "wb");
768768
if (outfile == NULL) {
769-
STOP(_("spillConnectionToFile: failed to open temp file '%s' for writing"), filepath); // # nocov
769+
STOP(_("spillConnectionToFile: failed to open temp file '%s' for writing: %s"), filepath, strerror(errno)); // # nocov
770770
}
771771

772772
// Read and write in chunks // TODO tune chunk size
@@ -804,7 +804,7 @@ INTERNAL_STOP(_("spillConnectionToFile: unexpected R_CONNECTIONS_VERSION = %d",
804804
// # nocov start
805805
free(buffer);
806806
fclose(outfile);
807-
STOP(_("spillConnectionToFile: write error (wrote %zu of %zu bytes)"), nwritten, bytes_to_write);
807+
STOP(_("spillConnectionToFile: write error %s (wrote %zu of %zu bytes)"), strerror(errno), nwritten, bytes_to_write);
808808
// # nocov end
809809
}
810810
total_read += bytes_to_write;

0 commit comments

Comments
 (0)