|
|
|
|
|
by Androider
3309 days ago
|
|
Does Node support filtered errors like Bluebird? somePromise.then(function() {
return a.b.c.d();
}).catch(TypeError, ReferenceError, function(e) {
//Will end up here on programmer error
}).catch(NetworkError, TimeoutError, function(e) {
//Will end up here on expected everyday network errors
}).catch(function(e) {
//Catch any unexpected errors
});
It's super useful. |
|