mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-02-01 15:23:03 +00:00
add unhandledRejection
This commit is contained in:
parent
5678b23656
commit
e53e415f8f
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user