diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-12-08 16:43:13 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-12-08 21:46:56 +0100 |
commit | 787c07bc94c3aa163981cb0321e92ce465d33d5f (patch) | |
tree | 03f4c70d285fa3ba9c5a7537ea060dc8af7e5b6a /pdf/pdf_function.c | |
parent | d1e25d11f7191ace03242c456a97b96febaec063 (diff) | |
download | mupdf-787c07bc94c3aa163981cb0321e92ce465d33d5f.tar.xz |
Remove remaining fz_error_note calls in the pdf code.
Diffstat (limited to 'pdf/pdf_function.c')
-rw-r--r-- | pdf/pdf_function.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/pdf/pdf_function.c b/pdf/pdf_function.c index 82c29dfd..fcd683ae 100644 --- a/pdf/pdf_function.c +++ b/pdf/pdf_function.c @@ -1090,18 +1090,18 @@ eval_sample_func(fz_context *ctx, pdf_function *func, float *in, float *out) * Exponential function */ -static fz_error +static void load_exponential_func(fz_context *ctx, pdf_function *func, fz_obj *dict) { fz_obj *obj; int i; if (func->m != 1) - return fz_error_make("/Domain must be one dimension (%d)", func->m); + fz_throw(ctx, "/Domain must be one dimension (%d)", func->m); obj = fz_dict_gets(dict, "N"); if (!fz_is_int(obj) && !fz_is_real(obj)) - return fz_error_make("malformed /N"); + fz_throw(ctx, "malformed /N"); func->u.e.n = fz_to_real(obj); obj = fz_dict_gets(dict, "C0"); @@ -1109,7 +1109,7 @@ load_exponential_func(fz_context *ctx, pdf_function *func, fz_obj *dict) { func->n = fz_array_len(obj); if (func->n >= MAXN) - return fz_error_make("exponential function result array out of range"); + fz_throw(ctx, "exponential function result array out of range"); for (i = 0; i < func->n; i++) func->u.e.c0[i] = fz_to_real(fz_array_get(obj, i)); } @@ -1123,18 +1123,16 @@ load_exponential_func(fz_context *ctx, pdf_function *func, fz_obj *dict) if (fz_is_array(obj)) { if (fz_array_len(obj) != func->n) - return fz_error_make("/C1 must match /C0 length"); + fz_throw(ctx, "/C1 must match /C0 length"); for (i = 0; i < func->n; i++) func->u.e.c1[i] = fz_to_real(fz_array_get(obj, i)); } else { if (func->n != 1) - return fz_error_make("/C1 must match /C0 length"); + fz_throw(ctx, "/C1 must match /C0 length"); func->u.e.c1[0] = 1; } - - return fz_okay; } static void |