Skip to content

help_msg is needed even when parse raises errors. #6

@Milky2018

Description

@Milky2018

Now we can only get the help_msg from parse like:

let help_msg = try {
  parser.parse(value, cli_args[:])
} catch {
  e => {
    println("Error: \{e}")
    return
  }
}

But we also need:

try {
  parser.parse(value, cli_args[:])
} catch {
  e => {
    println(help_msg)
    return
  }
}

Although there is public Parser::gen_help_message, it requires arguments which should not be provided by the users.

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