Q does not track* unhandled rejections at the moment, so you have to explicitly tell it the chain has ended.
Q.onerror
handles exceptions unhandled inside done
clauses:
get()
.done(function(val){ // you can not chain this, this indicates the chain is done
console.log('ok:'+val)
undefined._prop; // i would expect this exception to be
// forwarded to Q.onerror... but it doesn't
console.log('not reachd')
});
This is unlike libraries like Bluebird, that can figure out unhandled rejections on their own, or native promises in Firefox that use GC to detect unhandled rejections.
* (atm, an experimental feature was added to Q and then removed)