Created
January 9, 2015 18:52
-
-
Save grantcox/4a9a322946f758ad15fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var P = require('promise'); | |
P.all([1,2,3]).then(function(results){ | |
console.log('P.all success, results', results); | |
var a = invalid.property; // oops | |
console.log('after the invalid property') | |
}, function(err) { | |
console.log('P.all error', err); | |
}); | |
# expected output: | |
some exception being raised | |
# actual output: | |
node exception.js | |
P.all success, results [ 1, 2, 3 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Aha, for the "promise" library I need to chain "catch()", eg: