aboutsummaryrefslogtreecommitdiffstats
path: root/gps-track.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-12-06 10:31:52 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-12-09 11:49:50 +0100
commit90cfa83d95baf440544a331fd60f9903afa1fead (patch)
tree7ea42ac7b1c2263d15b306f658fd819cc61fc9b4 /gps-track.rsc
parent923a6385bf8fcb770a70650318d96f0571d7297e (diff)
gps-track: use $ExitError to indicate unintentional error
Diffstat (limited to 'gps-track.rsc')
-rw-r--r--gps-track.rsc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gps-track.rsc b/gps-track.rsc
index a2ea9ff..c0ecac4 100644
--- a/gps-track.rsc
+++ b/gps-track.rsc
@@ -11,6 +11,7 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local ExitOK false;
:do {
:local ScriptName [ :jobname ];
@@ -23,6 +24,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
+ :set ExitOK true;
:error false;
}
$WaitFullyConnected;
@@ -45,4 +47,6 @@
} else={
$LogPrint debug $ScriptName ("GPS data not valid.");
}
-} on-error={ }
+} on-error={
+ :global ExitError; $ExitError $ExitOK [ :jobname ];
+}