keymetrics / pm2-plus-tech-questions

http://docs.keymetrics.io/docs/pages/faq-troubleshooting/
27 stars 3 forks source link

Question: How to throw exceptions correctly #208

Closed BuffMcBigHuge closed 5 years ago

BuffMcBigHuge commented 5 years ago

We have console.errors scattered through our application, and we'd like a better way to review them, so we're wondering how to display these in the exception/issue panel on PM2 Plus.

Thanks!

vmarchaud commented 5 years ago

Hi,

You can use the notifyError from the pm2/io module. Note that every object you send must be error so they can be correctly parsed by PM2 Plus.