UNPKG

catch.js

Version:

Catch and handle errors after deployment

13 lines (12 loc) 195 B
node(handler) { if (process) { process.on('uncaughtException', err => { const obj = { err: err, time: new Date().toString() } this.errors.push(obj) handler(obj) }); } }