Skip to content

Commit

Permalink
add try-catch for mTimer.start
Browse files Browse the repository at this point in the history
  • Loading branch information
tumb1er committed Sep 28, 2019
1 parent a2e562a commit 158b1b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/ElPrimeroView.mc
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,11 @@ class ElPrimeroView extends WatchUi.WatchFace {
mState.onUpdateFinished();
if (!(mState.mIsBackgroundMode) && mState.mTwoHertzMode) {
mTimer.stop();
mTimer.start(method(:timerCallback), 500, false);
try {
mTimer.start(method(:timerCallback), 500, false);
} catch ( ex ) {
System.println(["2Hz error", ex.getErrorMessage()]);
}
}
}

Expand Down

0 comments on commit 158b1b7

Please sign in to comment.