Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Notice that there is no error handling for return_promise_2 and return_promise_3.
- //
- // To add it, we will have to add a second callback in each of the then statements.
- return return_promise_1().then(function() {
- return return_promise_2().then(function() {
- return return_promise_3()
- }),
- // This function is only executed if return_promise_1 fails.
- function() {
- // Your error handling
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment