aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mode-button.rsc6
1 files changed, 4 insertions, 2 deletions
diff --git a/mode-button.rsc b/mode-button.rsc
index 2d428ed..90fe80e 100644
--- a/mode-button.rsc
+++ b/mode-button.rsc
@@ -25,7 +25,7 @@
:if ([ :len $Scheduler ] = 0) do={
$LogPrint info $ScriptName ("Creating scheduler _ModeButtonScheduler, counting presses...");
- :global ModeButtonScheduler do={
+ :global ModeButtonScheduler do={ :do {
:local FuncName $0;
:global ModeButton;
@@ -81,7 +81,9 @@
} else={
$LogPrint info $FuncName ("No action defined for " . $Count . " mode-button presses.");
}
- }
+ } on-error={
+ :global ExitError; $ExitError false $0;
+ } }
/system/scheduler/add name="_ModeButtonScheduler" \
on-event=":global ModeButtonScheduler; \$ModeButtonScheduler;" interval=3s;
} else={