mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add fallback when logging uncaughtExceptions
This commit is contained in:
parent
bd142a9710
commit
273d9c76a7
12
packages/node_modules/node-red/red.js
vendored
12
packages/node_modules/node-red/red.js
vendored
@ -455,9 +455,17 @@ httpsPromise.then(function(startupHttps) {
|
||||
process.on('uncaughtException',function(err) {
|
||||
util.log('[red] Uncaught Exception:');
|
||||
if (err.stack) {
|
||||
RED.log.error(err.stack);
|
||||
try {
|
||||
RED.log.error(err.stack);
|
||||
} catch(err2) {
|
||||
util.log(err.stack);
|
||||
}
|
||||
} else {
|
||||
RED.log.error(err);
|
||||
try {
|
||||
RED.log.error(err);
|
||||
} catch(err2) {
|
||||
util.log(err);
|
||||
}
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user