diff --git a/netwatch-notify.rsc b/netwatch-notify.rsc index 0b8a8dc..d256689 100644 --- a/netwatch-notify.rsc +++ b/netwatch-notify.rsc @@ -12,7 +12,7 @@ :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :local ExitOK false; -:do { +:onerror Err { :local ScriptName [ :jobname ]; :global NetwatchNotify; @@ -224,6 +224,6 @@ "since"=($Metric->"since") }; } } -} on-error={ - :global ExitError; $ExitError $ExitOK [ :jobname ]; +} do={ + :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; }