From: Adam Chlipala Date: Sun, 23 Dec 2007 22:26:39 +0000 (+0000) Subject: dbtool gives help URL on bad arguments X-Git-Tag: release_2010-11-19~71 X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/commitdiff_plain/f6c112c388c3db7a129164ff0306d50a3c6f4e23?ds=inline dbtool gives help URL on bad arguments --- diff --git a/src/main-dbtool.sml b/src/main-dbtool.sml index 7bf0fec..d9765a9 100644 --- a/src/main-dbtool.sml +++ b/src/main-dbtool.sml @@ -18,9 +18,12 @@ (* Driver for dbtool *) +fun badArgs () = + print "Invalid command-line arguments. See documentation at:\n\thttp://wiki.hcoop.net/MemberManual/Databases\n" + val _ = case CommandLine.arguments () of - [] => print "Invalid command-line arguments\n" + [] => badArgs () | dbtype :: rest => case Dbms.lookup dbtype of NONE => print ("Unknown database type " ^ dbtype ^ ".\n") @@ -68,4 +71,4 @@ val _ = Main.requestDbGrant {dbtype = dbtype, dbname = dbname} else print ("Invalid database name " ^ dbname ^ ".\n") - | _ => print "Invalid command-line arguments\n" + | _ => badArgs ()