mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
This commit is contained in:
parent
994fb9dab7
commit
029d5e50b7
1 changed files with 12 additions and 0 deletions
|
@ -35,4 +35,16 @@ if (process.noProcessWarnings !== true) {
|
|||
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
// While the above warning listener would also be called on
|
||||
// unhandledRejection warnings, we can give a better error message if we
|
||||
// handle them separately:
|
||||
process.on('unhandledRejection', function(reason) {
|
||||
console.error('Unhandled Promise rejection detected:');
|
||||
console.error();
|
||||
console.error(reason);
|
||||
console.error();
|
||||
console.error('Terminating process...');
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue