summaryrefslogtreecommitdiff
path: root/Jennisys/Jennisys.fs
diff options
context:
space:
mode:
Diffstat (limited to 'Jennisys/Jennisys.fs')
-rw-r--r--Jennisys/Jennisys.fs15
1 files changed, 12 insertions, 3 deletions
diff --git a/Jennisys/Jennisys.fs b/Jennisys/Jennisys.fs
index d0a47fe1..604f02f8 100644
--- a/Jennisys/Jennisys.fs
+++ b/Jennisys/Jennisys.fs
@@ -40,7 +40,16 @@ let readAndProcess (filename: string) =
try
let args = Environment.GetCommandLineArgs()
- ParseCmdLineArgs (List.ofArray args)
- readAndProcess CONFIG.inputFilename
+ ParseCmdLineArgs (List.ofArray args |> List.tail)
+ if CONFIG.help then
+ printfn "%s" PrintHelpMsg
+ else
+ if CONFIG.inputFilename = "" then
+ printfn "*** Error: No input file was specified."
+ else
+ readAndProcess CONFIG.inputFilename
with
- | InvalidCmdLineOption(msg) as ex -> printfn "%s" msg; printfn "%s" ex.StackTrace \ No newline at end of file
+ | InvalidCmdLineOption(msg)
+ | InvalidCmdLineArg(msg) as ex ->
+ printfn " [ERROR] %s" msg;
+ printfn "%s" PrintHelpMsg \ No newline at end of file