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.