diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-09-16 23:21:05 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-09-16 23:21:28 +0100 |
| commit | 5488058d7ca995fcaaf642dcbe31dbc0255fe4be (patch) | |
| tree | 0f361b2a274e979d54208dc16c33dbdc06fbec58 /lib | |
| parent | 957cc76b3f841765f6c1ae3eeaafe912100a7ee0 (diff) | |
Rename promises.attempt() to try()
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/document-to-html.js | 2 | ||||
| -rw-r--r-- | lib/promises.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js index f6e8bd5..32c455f 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -199,7 +199,7 @@ function DocumentConversion(options, comments) { function recoveringConvertImage(convertImage) { return function(image, messages) { - return promises.attempt(function() { + return promises.try(function() { return convertImage(image, messages); }).catch(function(error) { messages.push(results.error(error)); diff --git a/lib/promises.js b/lib/promises.js index b318316..0b32e71 100644 --- a/lib/promises.js +++ b/lib/promises.js @@ -8,7 +8,7 @@ exports.props = bluebird.props; exports.reject = bluebird.reject; exports.mapSeries = bluebird.mapSeries; -exports.attempt = function(func) { +exports.try = function(func) { try { return bluebird.resolve(func()); } catch (error) { |
