Skip to content

Commit 6c6149a

Browse files
committed
Document Promise#catch
fix then#51
1 parent f794cd6 commit 6c6149a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ If the promise is fulfilled then `onFulfilled` is called. If the promise is rej
138138

139139
The call to `.then` also returns a promise. If the handler that is called returns a promise, the promise returned by `.then` takes on the state of that returned promise. If the handler that is called returns a value that is not a promise, the promise returned by `.then` will be fulfilled with that value. If the handler that is called throws an exception then the promise returned by `.then` is rejected with that exception.
140140

141+
#### Promise#catch(onRejected)
142+
143+
Sugar for `Promise#then(null, onRejected)`, to mirror `catch` in synchronous code.
144+
141145
#### Promise#done(onFulfilled, onRejected)
142146

143147
_Non Standard_

0 commit comments

Comments
 (0)