From 8fb0e3989a6867b67d5cafb04b622701d383a832 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 24 Apr 2018 16:28:27 +0200 Subject: Flesh out some more javascript convenience objects. Add some missing convenience data objects: font, highlight, position, etc. Add color.convert and color.equal functions. --- source/pdf/pdf-js.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/pdf/pdf-js.c') diff --git a/source/pdf/pdf-js.c b/source/pdf/pdf-js.c index a8e1d8a3..49b9c1e6 100644 --- a/source/pdf/pdf-js.c +++ b/source/pdf/pdf-js.c @@ -583,7 +583,7 @@ static void preload_helpers(pdf_js *js) js_dostring(js->imp, #include "js/util.js.h" - ); + ); } void pdf_drop_js(fz_context *ctx, pdf_js *js) @@ -696,14 +696,14 @@ void pdf_js_execute(pdf_js *js, char *source) { if (js_ploadstring(js->imp, "[pdf]", source)) { - fz_warn(js->ctx, "%s", js_tostring(js->imp, -1)); + fz_warn(js->ctx, "%s", js_trystring(js->imp, -1, "Error")); js_pop(js->imp, 1); return; } js_getregistry(js->imp, "Doc"); /* set 'this' to the Doc object */ if (js_pcall(js->imp, 0)) { - fz_warn(js->ctx, "%s", js_tostring(js->imp, -1)); + fz_warn(js->ctx, "%s", js_trystring(js->imp, -1, "Error")); js_pop(js->imp, 1); return; } -- cgit v1.2.3