diff options
author | Christian Hesse <mail@eworm.de> | 2024-11-15 23:02:43 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-11-15 23:09:24 +0100 |
commit | 53b6f7720ec33146581ceb878447d35d462c8697 (patch) | |
tree | 65d7f47d6dc1286d015224fc4e292ec80ba65d5f | |
parent | 1beda3aa7c08cbe0e06aff164fabfa86e8b6353d (diff) |
mode-button: catch runtime errors in executed code
-rw-r--r-- | mode-button.rsc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mode-button.rsc b/mode-button.rsc index 84eb8ea..ac1fb4f 100644 --- a/mode-button.rsc +++ b/mode-button.rsc @@ -64,7 +64,11 @@ :delay 200ms; } - [ :parse $Code ]; + :do { + [ :parse $Code ]; + } on-error={ + $LogPrint warning $0 ("The code for " . $Count . " mode-button presses failed with runtime error!"); + } } else={ $LogPrint warning $0 ("The code for " . $Count . " mode-button presses failed syntax validation!"); } |