pm2/test/fixtures/throw-later.js
2014-11-17 17:15:47 +08:00

9 lines
180 B
JavaScript

var timer = setInterval(function(){
console.log('tick', Date.now());
}, 100);
setTimeout(function(){
clearInterval(timer);
throw new Error('error has been caught')
}, 350);