add unhandledRejection

This commit is contained in:
lichengyin 2015-12-28 16:44:31 +08:00
parent 5678b23656
commit e53e415f8f

View File

@ -436,7 +436,7 @@ export default class {
* @return {} []
*/
captureError(){
process.on('uncaughtException', function(err){
process.on('uncaughtException', err => {
let msg = err.message;
err = think.error(err, 'port:' + think.config('port'));
think.log(err);
@ -444,6 +444,9 @@ export default class {
process.exit();
}
});
process.on('unhandledRejection', err => {
think.log(err);
});
}
/**
* start