W3cubDocs

/Bluebird

.catchThrow

.catchThrow(
    [class ErrorClass|function(any error) predicate],
    any reason
) -> Promise

Convenience method for:

.catch(function() {
   throw reason;
});

You may optionally prepend one predicate function or ErrorClass to pattern match the error (the generic .catch methods accepts multiple)

Same limitations regarding to the binding time of reason to apply as with .return.

© 2013–2018 Petka Antonov
Licensed under the MIT License.
http://bluebirdjs.com/docs/api/catchthrow.html