diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-06 10:31:52 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-09 11:49:50 +0100 |
commit | ede351f47e8311fe00bada723e69ab90dc1332d0 (patch) | |
tree | 56bc0f58b9373c14b63f826888639aba0a8a859c /sms-action.rsc | |
parent | be0548007184bae80dd40b4a6390ababeeb39617 (diff) |
sms-action: use $ExitError to indicate unintentional error
Diffstat (limited to 'sms-action.rsc')
-rw-r--r-- | sms-action.rsc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sms-action.rsc b/sms-action.rsc index c896659..fd3096c 100644 --- a/sms-action.rsc +++ b/sms-action.rsc @@ -11,6 +11,7 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:local ExitOK false; :do { :local ScriptName [ :jobname ]; @@ -23,6 +24,7 @@ :if ([ :typeof $Action ] = "nothing") do={ $LogPrint error $ScriptName ("This script is supposed to run from SMS hook with action=..."); + :set ExitOK true; :error false; } @@ -34,4 +36,6 @@ } else={ $LogPrint warning $ScriptName ("The code for action '" . $Action . "' failed syntax validation!"); } -} on-error={ } +} on-error={ + :global ExitError; $ExitError $ExitOK [ :jobname ]; +} |