Bluebird: fix Promise.try
This commit is contained in:
parent
e1fb322670
commit
a0c77549bd
12
bluebird.md
12
bluebird.md
|
@ -40,10 +40,14 @@ Promise.props({
|
|||
### Chain of promises
|
||||
|
||||
```js
|
||||
Promise.try(function () {
|
||||
if (err) throw new Error("boo");
|
||||
return result;
|
||||
});
|
||||
function getPhotos() {
|
||||
return Promise.try(function () {
|
||||
if (err) throw new Error("boo");
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
getPhotos().then(...)
|
||||
```
|
||||
|
||||
### Working with node-style functions
|
||||
|
|
Loading…
Reference in New Issue