From 9406ed183d4f1b1bb2b44eee08dce751f0f15345 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Mon, 6 Aug 2012 11:50:48 +0200 Subject: Make fz_open_file_*() always throw exceptions upon error Thanks to Zeniko for pointing out the inconsistency. --- fitz/stm_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fitz/stm_open.c b/fitz/stm_open.c index 1709340b..3d605e1a 100644 --- a/fitz/stm_open.c +++ b/fitz/stm_open.c @@ -140,7 +140,7 @@ fz_open_file_w(fz_context *ctx, const wchar_t *name) { int fd = _wopen(name, O_BINARY | O_RDONLY, 0); if (fd == -1) - return NULL; + fz_throw(ctx, "cannot open file %Ls", name); return fz_open_fd(ctx, fd); } #endif -- cgit v1.2.3