summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-op-run.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/pdf/pdf-op-run.c')
-rw-r--r--source/pdf/pdf-op-run.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c
index 6367fff9..1ad0e610 100644
--- a/source/pdf/pdf-op-run.c
+++ b/source/pdf/pdf-op-run.c
@@ -1194,6 +1194,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_obj *xobj, pdf_obj
int gparent_save;
fz_matrix gparent_save_ctm;
int cleanup_state = 0;
+ int err = FZ_ERROR_NONE;
char errmess[256] = "";
pdf_obj *resources;
fz_rect xobj_bbox;
@@ -1314,6 +1315,7 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_obj *xobj, pdf_obj
fz_catch(ctx)
{
/* Postpone the problem */
+ err = fz_caught(ctx);
strcpy(errmess, fz_caught_message(ctx));
}
}
@@ -1343,8 +1345,9 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_obj *xobj, pdf_obj
fz_catch(ctx)
{
/* Postpone the problem */
- if (errmess[0])
- fz_warn(ctx, "%s", errmess);
+ if (err)
+ fz_warn(ctx, "ignoring error: %s", errmess);
+ err = fz_caught(ctx);
strcpy(errmess, fz_caught_message(ctx));
}
}
@@ -1357,8 +1360,9 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_obj *xobj, pdf_obj
fz_catch(ctx)
{
/* Postpone the problem */
- if (errmess[0])
- fz_warn(ctx, "%s", errmess);
+ if (err)
+ fz_warn(ctx, "ignoring error: %s", errmess);
+ err = fz_caught(ctx);
strcpy(errmess, fz_caught_message(ctx));
}
}
@@ -1378,8 +1382,8 @@ pdf_run_xobject(fz_context *ctx, pdf_run_processor *proc, pdf_obj *xobj, pdf_obj
}
/* Rethrow postponed errors */
- if (errmess[0])
- fz_throw(ctx, FZ_ERROR_GENERIC, "%s", errmess);
+ if (err)
+ fz_throw(ctx, err, "%s", errmess);
}
/* general graphics state */