Kotlin / kotlinx-cli

Pure Kotlin implementation of a generic CLI parser.
Apache License 2.0
914 stars 71 forks source link

Is it worth to print stack trace with help usage? #57

Closed sviridov-alexey closed 3 years ago

sviridov-alexey commented 3 years ago

I believe stack trace is not very usable information for end-user. But on other hand it affect usability of program

Exception in thread "main" java.lang.IllegalStateException: Value for argument project-key should be always provided in command line.
Usage: hosting versions options_list
Arguments: 
    project-key -> key of project which site will belong to { String }
    site-name -> hosted site name { String }
Options: 
    --offset, -o [0] -> start line { Int }
    --page-size, -s [40] -> number lines to show { Int }
    --help, -h -> Usage info 

        at kotlinx.cli.ArgParser.printError(ArgParser.kt:348)
        at kotlinx.cli.ArgParser.parse(ArgParser.kt:637)
        at kotlinx.cli.ArgParser.parse(ArgParser.kt:642)
        at kotlinx.cli.ArgParser.parse(ArgParser.kt:642)
        at kotlinx.cli.ArgParser.parse(ArgParser.kt:523)
        at circlet.cli.MainKt.main(main.kt:20)
LepilkinaElena commented 3 years ago

Fixed