From 69b724ccb959cce783ccef4fc339f314ae5d97b7 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 6 Dec 2024 15:17:57 +0100 Subject: hello-world: use $ExitError to indicate unintentional error --- hello-world.rsc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'hello-world.rsc') diff --git a/hello-world.rsc b/hello-world.rsc index e3ebf8a..2064bfd 100644 --- a/hello-world.rsc +++ b/hello-world.rsc @@ -9,6 +9,7 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:local ExitOK false; :do { :local ScriptName [ :jobname ]; @@ -21,4 +22,6 @@ } else={ $SendNotification2 ({ origin=$ScriptName; subject="Hello..."; message="... world!" }); } -} on-error={ } +} on-error={ + :global ExitError; $ExitError $ExitOK [ :jobname ]; +} -- cgit v1.2.3-70-g09d2