diff src/main/kotlin/name/blackcap/passman/CreateSubcommand.kt @ 3:eafa3779aef8

More bug fixes, quote strings in diagnostics.
author David Barts <n5jrn@me.com>
date Sun, 11 Sep 2022 20:36:06 -0700
parents a6cfdffcaa94
children 711cc42e96d7
line wrap: on
line diff
--- a/src/main/kotlin/name/blackcap/passman/CreateSubcommand.kt	Sun Sep 11 18:24:55 2022 -0700
+++ b/src/main/kotlin/name/blackcap/passman/CreateSubcommand.kt	Sun Sep 11 20:36:06 2022 -0700
@@ -29,7 +29,7 @@
             val length = try {
                 rawLength?.toInt() ?: DEFAULT_GENERATED_LENGTH
             } catch (e: NumberFormatException) {
-                die("$rawLength - invalid length")
+                die("${see(rawLength)} - invalid length")
                 -1  /* will never happen */
             }
             val symbols = commandLine.hasOption("symbols")
@@ -46,7 +46,7 @@
             result.next()
             val count = result.getInt(1)
             if (count > 0) {
-                die("record matching ${entry.name} already exists")
+                die("record matching ${see(entry.name)} already exists")
             }
         }