Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express uncaughtexception

process
  .on('unhandledRejection', (reason, p) => {
    console.error(reason, 'Unhandled Rejection at Promise', p);
  })
  .on('uncaughtException', err => {
    console.error(err, 'Uncaught Exception thrown');
    process.exit(1);
  });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #express #uncaughtexception
ADD COMMENT
Topic
Name
5+8 =