Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
catch my error daddy
Browse files Browse the repository at this point in the history
  • Loading branch information
hb432 committed Jun 14, 2020
1 parent ee79970 commit f0daf1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@
interval: (script, period) => {
const state = { iteration: null };
const loop = () => {
script();
try {
script();
} catch (error) {
console.error(error);
}
state.iteration = framework.timeout(loop, period);
};
state.iteration = framework.timeout(loop, period);
Expand Down

0 comments on commit f0daf1e

Please sign in to comment.