summaryrefslogtreecommitdiff
path: root/source/fitz/stream-open.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/stream-open.c')
-rw-r--r--source/fitz/stream-open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/stream-open.c b/source/fitz/stream-open.c
index 4a3b69ad..b4df2a61 100644
--- a/source/fitz/stream-open.c
+++ b/source/fitz/stream-open.c
@@ -142,7 +142,7 @@ fz_open_file(fz_context *ctx, const char *name)
f = fz_fopen(name, "rb");
#endif
if (f == NULL)
- fz_throw(ctx, FZ_ERROR_GENERIC, "cannot open %s", name);
+ fz_throw(ctx, FZ_ERROR_GENERIC, "cannot open %s: %s", name, strerror(errno));
return fz_open_file_ptr(ctx, f);
}
@@ -152,7 +152,7 @@ fz_open_file_w(fz_context *ctx, const wchar_t *name)
{
FILE *f = _wfopen(name, L"rb");
if (f == NULL)
- fz_throw(ctx, FZ_ERROR_GENERIC, "cannot open file %ls", name);
+ fz_throw(ctx, FZ_ERROR_GENERIC, "cannot open file %ls: %s", name, strerror(errno));
return fz_open_file_ptr(ctx, f);
}
#endif