From d333cee1c7a7f95cadf5b59e8dbb0124d73852df Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 28 Aug 2016 20:03:00 +0100 Subject: Add test explicitly for image error handling --- lib/document-to-html.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/document-to-html.js') diff --git a/lib/document-to-html.js b/lib/document-to-html.js index e022946..6094803 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -193,7 +193,9 @@ function DocumentConversion(options, comments) { function recoveringConvertImage(convertImage) { return function(image, messages) { - return convertImage(image, messages).caught(function(error) { + return promises.attempt(function() { + return convertImage(image, messages); + }).caught(function(error) { messages.push(results.error(error)); return []; }); -- cgit v1.2.3