summaryrefslogtreecommitdiff
path: root/fitz/stm_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/stm_open.c')
-rw-r--r--fitz/stm_open.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fitz/stm_open.c b/fitz/stm_open.c
index d82acf0a..9e4dc8d4 100644
--- a/fitz/stm_open.c
+++ b/fitz/stm_open.c
@@ -67,7 +67,7 @@ static int read_file(fz_stream *stm, unsigned char *buf, int len)
{
int n = read(*(int*)stm->state, buf, len);
if (n < 0)
- fz_throw(stm->ctx, "read error: %s", strerror(errno));
+ fz_throw(stm->ctx, FZ_ERROR_GENERIC, "read error: %s", strerror(errno));
return n;
}
@@ -75,7 +75,7 @@ static void seek_file(fz_stream *stm, int offset, int whence)
{
int n = lseek(*(int*)stm->state, offset, whence);
if (n < 0)
- fz_throw(stm->ctx, "cannot lseek: %s", strerror(errno));
+ fz_throw(stm->ctx, FZ_ERROR_GENERIC, "cannot lseek: %s", strerror(errno));
stm->pos = n;
stm->rp = stm->bp;
stm->wp = stm->bp;
@@ -131,7 +131,7 @@ fz_open_file(fz_context *ctx, const char *name)
int fd = open(name, O_BINARY | O_RDONLY, 0);
#endif
if (fd == -1)
- fz_throw(ctx, "cannot open %s", name);
+ fz_throw(ctx, FZ_ERROR_GENERIC, "cannot open %s", name);
return fz_open_fd(ctx, fd);
}
@@ -141,7 +141,7 @@ fz_open_file_w(fz_context *ctx, const wchar_t *name)
{
int fd = _wopen(name, O_BINARY | O_RDONLY, 0);
if (fd == -1)
- fz_throw(ctx, "cannot open file %ls", name);
+ fz_throw(ctx, FZ_ERROR_GENERIC, "cannot open file %ls", name);
return fz_open_fd(ctx, fd);
}
#endif