Skip to content

Commit

Permalink
Merge branch 'improvement/CLDSRV-466/timestamps_in_stderr' into q/7.10
Browse files Browse the repository at this point in the history
  • Loading branch information
bert-e committed Nov 13, 2023
2 parents e0eab95 + b1b2d2a commit 0882bff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
'use strict'; // eslint-disable-line strict

/**
* Catch uncaught exceptions and add timestamp to aid debugging
*/
process.on('uncaughtException', err => {
process.stderr.write(`${new Date().toISOString()}: Uncaught exception: \n${err.stack}`);
});

require('./lib/server.js')();

0 comments on commit 0882bff

Please sign in to comment.