Permalink
Browse files

Attempt at addressing #228

  • Loading branch information...
1 parent b67350d commit dfbf4c729abaf09e1ace085d864be02c4cdbb27c @mattgodbolt committed Jan 8, 2017
Showing with 9 additions and 4 deletions.
  1. +9 −4 app.js
View
@@ -522,8 +522,13 @@ findCompilers()
.post('/diff', diffHandler); // used inside static/compiler.js
logger.info("=======================================");
+ webServer.on('error', function (err) {
+ logger.error('Caught error:', err, "(in web error handler; continuing)");
+ });
+
webServer.listen(port, hostname);
- }).catch(function (err) {
- logger.error("Error: " + err);
- process.exit(1);
-});
+ })
+ .catch(function (err) {
+ logger.error("Promise error:", err, "(shutting down)");
+ process.exit(1);
+ });

0 comments on commit dfbf4c7

Please sign in to comment.