changeset 7:63eab373d348

Catch more syntax errors.
author David Barts <n5jrn@me.com>
date Wed, 25 Aug 2021 08:31:31 -0700
parents cd32e08fa37f
children 290b0b2a584b
files MakeWaypoints.kt
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MakeWaypoints.kt	Wed Aug 25 08:26:05 2021 -0700
+++ b/MakeWaypoints.kt	Wed Aug 25 08:31:31 2021 -0700
@@ -32,6 +32,10 @@
         }
         fileArg = 1
     }
+    if (args.size != 1) {
+        System.err.println(syntaxError)
+        System.exit(2)
+    }
     val outName = args[fileArg]
 
     /* explain purpose */