Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

handle-exceptions.js 472 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  1. const FailBot = require('./failbot')
  2. process.on('uncaughtException', async err => {
  3. if (err.code === 'MODULE_NOT_FOUND') {
  4. console.error('\n\n🔥 Uh oh! It looks you are missing a required npm module.')
  5. console.error('Please run `npm install` to make sure you have all the required dependencies.\n\n')
  6. }
  7. console.error(err)
  8. await FailBot.report(err)
  9. })
  10. process.on('unhandledRejection', async err => {
  11. console.error(err)
  12. await FailBot.report(err)
  13. })
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...