4 ms·
So is the default use case this? process.on('unhandledRejection', function(ex){ throw ex; }); ...the idea being that it's analogous to an uncaug
by _greim_ 12y ago
So is the default use case this?
process.on('unhandledRejection', function(ex){
throw ex;
});
...the idea being that it's analogous to an uncaught exception bubbling up to the top and causing the process to crash, which is generally what you want to happen?
- inglor 12y agoYes, it's possible this indeed will be the default behavior at some later point. Some people don't like this since `unhandledRejection`s can be handled later on at some point (for example, after a week of not adding a catch handler). There is a discussion here: https://github.com/iojs/io.js/issues/830 https://github.com/iojs/io.js/issues/830