mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-19 05:37:53 +00:00
Merge pull request #2154 from balena-os/log-uncaught-exceptions
Log uncaught promise exceptions on the app entry
This commit is contained in:
commit
8259dae691
@ -136,4 +136,9 @@ process.on('SIGTERM', () => {
|
||||
});
|
||||
|
||||
const supervisor = new Supervisor();
|
||||
supervisor.init();
|
||||
supervisor.init().catch((e) => {
|
||||
log.error('Uncaught exception:', e);
|
||||
|
||||
// Terminate the process to avoid leaving the supervisor in a bad state
|
||||
process.exit(1);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user