Log all deviations of promises in Q
1 answer
Q actually supports this already - as of 1.3.0 Q offers standard raw rejection hooks :
process.on("unhandledRejection", function(reason, p) {
console.log("Unhandled rejection detected ", reason, p);
});
You can also log to catch errors from .done
withQ.onerror
:
Q.onerror = function(error){
// errors will be here and not thrown in `done` chains.
};
+3
source to share