Add ( Console.ReadKey true ) |> ignore
to the end of your function. This will cause the console window to pause and wait for a keypress (any keypress) before exiting (see MSDN).
Also, use e.ToString()
rather than just e.Message
. Exception.ToString() will give you the complete strack trace and other related information which is usually much more helpful then just the Exception Message.
Exit codes are unique to every application. When looking up error codes, you must make sure that the dictionary you are looking at matches the application and version number.