From f01e54eae16525e3e06b4449958458ad7697ca9a Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 11 Jun 2018 17:25:46 +0200 Subject: [PATCH] Improve the warning messages printed by `PartialEvaluator.{getOperatorList, getTextContent} when errors are being ignored Currently the actual errors aren't printed, which can make debugging harder than necessary. --- src/core/evaluator.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/evaluator.js b/src/core/evaluator.js index 315b56b41..746b2ae37 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -1261,7 +1261,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { // notification and allow rendering to continue. this.handler.send('UnsupportedFeature', { featureId: UNSUPPORTED_FEATURES.unknown, }); - warn('getOperatorList - ignoring errors during task: ' + task.name); + warn(`getOperatorList - ignoring errors during "${task.name}" ` + + `task: "${reason}".`); closePendingRestoreOPS(); return; @@ -1846,7 +1847,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { } if (this.options.ignoreErrors) { // Error(s) in the TextContent -- allow text-extraction to continue. - warn('getTextContent - ignoring errors during task: ' + task.name); + warn(`getTextContent - ignoring errors during "${task.name}" ` + + `task: "${reason}".`); flushTextContentItem(); enqueueChunk();