aboutsummaryrefslogtreecommitdiff
path: root/lib/document-to-html.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-08-28 20:03:00 +0100
committerMichael Williamson <mike@zwobble.org>2016-08-28 20:03:00 +0100
commitd333cee1c7a7f95cadf5b59e8dbb0124d73852df (patch)
treef837b57e640eb9bad909416c6822f6edb9d192ac /lib/document-to-html.js
parentb1ae23f544c479d2b71347bbf67df7baac40d78f (diff)
Add test explicitly for image error handling
Diffstat (limited to 'lib/document-to-html.js')
-rw-r--r--lib/document-to-html.js4
1 files changed, 3 insertions, 1 deletions
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 [];
});