diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-09-11 19:29:42 -0500 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-09-14 17:44:13 +0100 |
commit | 89ae81f651bfa112b8e07317eb6983beaf7cb212 (patch) | |
tree | 3f99dad1253b795629e66d45b915c1d72043242b /fitz/filt_jbig2d.c | |
parent | cefb81f1886685580a40b17b5e495a8a8a1ebeaf (diff) | |
download | mupdf-89ae81f651bfa112b8e07317eb6983beaf7cb212.tar.xz |
Initial import of exception handling code
Import exception handling code from WSS, modified to fit into the
fitz world.
With this code we have 'real' fz_try/fz_catch/fz_rethrow functions,
handling a fz_except type. We therefore rename the existing fz_throw/
fz_catch/fz_rethrow to be fz_error_make/fz_error_handle/fz_error_note.
We don't actually use fz_try/fz_catch/fz_rethrow yet...
Diffstat (limited to 'fitz/filt_jbig2d.c')
-rw-r--r-- | fitz/filt_jbig2d.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/filt_jbig2d.c b/fitz/filt_jbig2d.c index 4dbe542c..ad335045 100644 --- a/fitz/filt_jbig2d.c +++ b/fitz/filt_jbig2d.c @@ -57,7 +57,7 @@ read_jbig2d(fz_stream *stm, unsigned char *buf, int len) { n = fz_read(state->chain, tmp, sizeof tmp); if (n < 0) - return fz_rethrow(n, "read error in jbig2 filter"); + return fz_error_note(n, "read error in jbig2 filter"); if (n == 0) break; jbig2_data_in(state->ctx, tmp, n); @@ -67,7 +67,7 @@ read_jbig2d(fz_stream *stm, unsigned char *buf, int len) state->page = jbig2_page_out(state->ctx); if (!state->page) - return fz_throw("jbig2_page_out failed"); + return fz_error_make("jbig2_page_out failed"); } s = state->page->data; |