hello-world: use $ExitError to indicate unintentional error

This commit is contained in:
Christian Hesse 2024-12-06 15:17:57 +01:00
parent 43d0f9f371
commit 69b724ccb9

View file

@ -9,6 +9,7 @@
:global GlobalFunctionsReady; :global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:do { :do {
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
@ -21,4 +22,6 @@
} else={ } else={
$SendNotification2 ({ origin=$ScriptName; subject="Hello..."; message="... world!" }); $SendNotification2 ({ origin=$ScriptName; subject="Hello..."; message="... world!" });
} }
} on-error={ } } on-error={
:global ExitError; $ExitError $ExitOK [ :jobname ];
}