summaryrefslogtreecommitdiff
path: root/pdf/pdf_type3.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-09-11 19:29:42 -0500
committerRobin Watts <robin.watts@artifex.com>2011-09-14 17:44:13 +0100
commit89ae81f651bfa112b8e07317eb6983beaf7cb212 (patch)
tree3f99dad1253b795629e66d45b915c1d72043242b /pdf/pdf_type3.c
parentcefb81f1886685580a40b17b5e495a8a8a1ebeaf (diff)
downloadmupdf-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 'pdf/pdf_type3.c')
-rw-r--r--pdf/pdf_type3.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pdf/pdf_type3.c b/pdf/pdf_type3.c
index 1d851ebe..1d814ddd 100644
--- a/pdf/pdf_type3.c
+++ b/pdf/pdf_type3.c
@@ -49,7 +49,7 @@ pdf_load_type3_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *rdb, fz_o
encoding = fz_dict_gets(dict, "Encoding");
if (!encoding)
{
- error = fz_throw("syntaxerror: Type3 font missing Encoding");
+ error = fz_error_make("syntaxerror: Type3 font missing Encoding");
goto cleanup;
}
@@ -98,7 +98,7 @@ pdf_load_type3_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *rdb, fz_o
widths = fz_dict_gets(dict, "Widths");
if (!widths)
{
- error = fz_throw("syntaxerror: Type3 font missing Widths");
+ error = fz_error_make("syntaxerror: Type3 font missing Widths");
goto cleanup;
}
@@ -130,7 +130,7 @@ pdf_load_type3_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *rdb, fz_o
charprocs = fz_dict_gets(dict, "CharProcs");
if (!charprocs)
{
- error = fz_throw("syntaxerror: Type3 font missing CharProcs");
+ error = fz_error_make("syntaxerror: Type3 font missing CharProcs");
goto cleanup;
}
@@ -154,5 +154,5 @@ pdf_load_type3_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *rdb, fz_o
cleanup:
fz_drop_font(fontdesc->font);
fz_free(fontdesc);
- return fz_rethrow(error, "cannot load type3 font (%d %d R)", fz_to_num(dict), fz_to_gen(dict));
+ return fz_error_note(error, "cannot load type3 font (%d %d R)", fz_to_num(dict), fz_to_gen(dict));
}