From d49431c30ff2d267a656c223aa28f309d4a98ee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=BCnzli?= Date: Sat, 22 Feb 2014 23:31:08 +0100 Subject: make pdf_new_obj_from_str throw on error Currently, pdf_new_obj_from_str returns NULL if the object can't be parsed. This isn't consistent with how all other pdf_new_* methods behave which is to throw on errors. --- source/pdf/pdf-object.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source') diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c index f8ece944..16fab07c 100644 --- a/source/pdf/pdf-object.c +++ b/source/pdf/pdf-object.c @@ -1409,8 +1409,7 @@ pdf_obj *pdf_new_obj_from_str(pdf_document *doc, const char *src) } fz_catch(ctx) { - fz_rethrow_if(ctx, FZ_ERROR_TRYLATER); - return NULL; + fz_rethrow(ctx); } return result; -- cgit v1.2.3