I guess it doesn't help in the original case where execution stops almost immediately (as the chances of Ctrl-C being hit during execution are tiny), but I guess I could do something like:
executeInterval();
if (wasError or Ctrl-C pressed during execution) {
reportError();
if (Ctrl-C last pressed less than 0.5 sec ago)
removeInterval();
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I guess it doesn't help in the original case where execution stops almost immediately (as the chances of Ctrl-C being hit during execution are tiny), but I guess I could do something like:
Hopefully that would work out?