From 89ae81f651bfa112b8e07317eb6983beaf7cb212 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Sun, 11 Sep 2011 19:29:42 -0500 Subject: 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... --- scripts/cmapdump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/cmapdump.c b/scripts/cmapdump.c index dfb3faa0..b1e91f9b 100644 --- a/scripts/cmapdump.c +++ b/scripts/cmapdump.c @@ -78,12 +78,12 @@ main(int argc, char **argv) fi = fz_open_file(argv[i]); if (!fi) - fz_throw("cmapdump: could not open input file '%s'\n", argv[i]); + fz_error_make("cmapdump: could not open input file '%s'\n", argv[i]); error = pdf_parse_cmap(&cmap, fi); if (error) { - fz_catch(error, "cmapdump: could not parse input cmap '%s'\n", argv[i]); + fz_error_handle(error, "cmapdump: could not parse input cmap '%s'\n", argv[i]); return 1; } -- cgit v1.2.3