Add debug mode to log rejections

This commit is contained in:
Lamp 2019-05-16 11:33:01 -07:00 committed by GitHub
parent 9e1b9b5257
commit a9e0b40f13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,5 +36,7 @@ async function capture() {
(function loop(){
capture().finally(()=>{
setTimeout(loop, config.interval);
}).catch(()=>{});
}).catch(rejection => {
if (process.env.DEBUG) console.error(rejection);
});
})();