qbicsoftware / statistics-cli

This tools is responsible for data retrieval and formatting, in order to visualize data on our homepage.
MIT License
1 stars 0 forks source link

Better exception handling #16

Closed chahuistle closed 5 years ago

chahuistle commented 5 years ago

Running this tool without any parameters produces the following output:

Exception in thread "main" picocli.CommandLine$MissingParameterException: Missing required options [-openBisUrl=<openBISUrl>, -user=<openBISUsername>, -password=<openBISPassword>, -outputFile=<outputFileName>, -ncbiTaxUrl=<ncbiTaxUrl>, -domainThreshold=<domainThreshold>, -gitHubUrl=<gitHubUrl>, -gitHubHeaderKey=<gitHubHeaderKey>, -gitHubHeaderValue=<gitHubHeaderValue>, -maxNumRepos=<maxNumRepos>]
    at picocli.CommandLine$MissingParameterException.create(CommandLine.java:7882)
    at picocli.CommandLine$MissingParameterException.access$9000(CommandLine.java:7864)
    at picocli.CommandLine$Interpreter.parse(CommandLine.java:4795)
    at picocli.CommandLine$Interpreter.parse(CommandLine.java:4694)
    at picocli.CommandLine.parse(CommandLine.java:523)
    at picocli.CommandLine.populateCommand(CommandLine.java:504)
    at life.qbic.cli.AbstractCommand.parseArguments(AbstractCommand.java:62)
    at life.qbic.cli.ToolExecutor.validateParametersAndParseCommandlineArguments(ToolExecutor.java:63)
    at life.qbic.cli.ToolExecutor.invoke(ToolExecutor.java:41)
    at life.qbic.cli.MainEntryPoint.main(MainEntryPoint.java:23)

One would expect a clean output displaying how to use the tool, i.e., the "usage" text.

FriederikeHanssen commented 5 years ago

Is this something I can fix on my side or is it something that is handled via the cli abstract classes. Liek AbstractTool etc?

chahuistle commented 5 years ago

AFAIK a new version of the cli abstract does that already. Don't worry about it, though, it's on my plate.

On Tue, Nov 20, 2018, 12:16 FriederikeHanssen notifications@github.com wrote:

Is this something I can fix on my side or is it something that is handled via the cli abstract classes. Liek AbstractTool etc?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/qbicsoftware/statistics-cli/issues/16#issuecomment-440237681, or mute the thread https://github.com/notifications/unsubscribe-auth/ABd0pc3vPyNziwlPYeG6pWDA4XxnShtxks5uw-SPgaJpZM4Yqyp7 .