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

Improve error message.

parent 4dff1e2f
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -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