Skip to content
Snippets Groups Projects
Commit 5ce7b410 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel: Committed by Sergey Kosukhin
Browse files

Improve error message.

parent 31bb4209
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,11 @@ initBFiledataP(struct fileFunnelStdio *bfp, const char *filename, size_t bs, siz
}
}
if ((bfp->fp = fopen(filename, "w")) == NULL) xabort("Failed to open %s", bfp->name);
if ((bfp->fp = fopen(filename, "w")) == NULL)
{
int fopen_errno = errno;
xabort("Failed to open %s\nerrno=%d: %s", bfp->name, fopen_errno, strerror(fopen_errno));
}
struct dBuffer *db = bfp->db = Malloc(sizeof(*db) * nc);
for (size_t i = 0; i < nc; ++i) cdiPioDbufferInit(db + i, bs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment