diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-09 09:03:41 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-09 11:49:50 +0100 |
commit | 1fe90a6e9aeaba7350f13f52cc9a196a0bc8ca1c (patch) | |
tree | 27280d0811da4f20187be43bfc13f9402a466bf8 /mode-button.rsc | |
parent | 5b9031ccca75e7e1ba8479af1ae180ae8422ac74 (diff) |
mode-button: $ModeButtonScheduler: use $ExitError to indicate unintentional error
Diffstat (limited to 'mode-button.rsc')
-rw-r--r-- | mode-button.rsc | 6 |
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={ |