Skip to content

Some invalid options show "is unrecognized" while some crash the process #2

@ProductiveRage

Description

@ProductiveRage

I accidentally used "/P" instead of "/PW" and got an exception thrown:

Unhandled Exception: Microsoft.FSharp.Core.MatchFailureException: The match cases were incomplete
at SQLient.CommandLine.parseCommandLineRec(FSharpList1 args, CommandLineOptions optionsSoFar) in C:\Users\droberts\Documents\GitHub\sqlient\SQLient\CommandLine.fs:line 38 at SQLient.CommandLine.parseCommandLine(FSharpList1 args) in C:\Users\droberts\Documents\GitHub\sqlient\SQLient\CommandLine.fs:line 63
at SQLient.Main.main(String[] args) in C:\Users\droberts\Documents\GitHub\sqlient\SQLient\Program.fs:line 27

Trying another invalid option ("/O", selected for no reason of than it was the key next to "P") does not result in an exception, instead the following is displayed -

Option '/O' is unrecognized
Error. "Server needs to be specified

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions