diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-11-24 11:33:05 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-12-11 11:47:26 +0100 |
commit | 86fcfed585b97fc629177fc1fb64c45e718f716d (patch) | |
tree | 12d37b854ec6202f0b6e1e72df5684fffacd19ec | |
parent | 6b0f4f79cdac06fe790830331bb2b41d8a9a204b (diff) | |
download | mupdf-86fcfed585b97fc629177fc1fb64c45e718f716d.tar.xz |
Use strerror for more detailed error messages.
-rw-r--r-- | source/fitz/stream-open.c | 4 |
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 |