Skip to content

Commit

Permalink
Catch errors when starting node_helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
veeck committed Oct 13, 2022
1 parent 96cb158 commit 86cba45
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,13 @@ function App() {
for (let nodeHelper of nodeHelpers) {
nodeHelper.setExpressApp(app);
nodeHelper.setSocketIO(io);
nodePromises.push(nodeHelper.start());

try {
nodePromises.push(nodeHelper.start());
} catch (error) {
Log.error(`Error when starting node_helper for module ${nodeHelper.name}:`);
Log.error(error);
}
}

Promise.allSettled(nodePromises).then(() => {
Expand Down

0 comments on commit 86cba45

Please sign in to comment.