You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "John D. Ament (JIRA)" <ji...@apache.org> on 2015/06/17 02:23:00 UTC
[jira] [Comment Edited] (ARTEMIS-116) Nicer CLI validation when
using bin/activemq command to create a broker etc
[ https://issues.apache.org/jira/browse/ARTEMIS-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589077#comment-14589077 ]
John D. Ament edited comment on ARTEMIS-116 at 6/17/15 12:22 AM:
-----------------------------------------------------------------
Here's the better version
{code}
Johns-MacBook-Pro:apache-artemis-1.0.1-SNAPSHOT johnament$ ./bin/artemis create
Required parameters are missing: directory
usage: artemis <command> [<args>]
The most commonly used artemis commands are:
create creates a new broker instance
data data tools group (print|exp|imp|exp|encode|decode) (example ./artemis data print)
help Display help information
See 'artemis help <command>' for more information on a specific command.
{code}
was (Author: johndament):
Here's the better version
{{code}}
Johns-MacBook-Pro:apache-artemis-1.0.1-SNAPSHOT johnament$ ./bin/artemis create
Required parameters are missing: directory
usage: artemis <command> [<args>]
The most commonly used artemis commands are:
create creates a new broker instance
data data tools group (print|exp|imp|exp|encode|decode) (example ./artemis data print)
help Display help information
See 'artemis help <command>' for more information on a specific command.
{{code}}
> Nicer CLI validation when using bin/activemq command to create a broker etc
> ---------------------------------------------------------------------------
>
> Key: ARTEMIS-116
> URL: https://issues.apache.org/jira/browse/ARTEMIS-116
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 1.0.1
>
>
> Following the user guide to create a broker, I did not specify a directory name and I got this stacktrace error message
> {code}
> davsclaus:/opt/apache-artemis-1.0.1-SNAPSHOT/$ ./bin/artemis create
> Exception in thread "main" io.airlift.airline.ParseArgumentsMissingException: Required parameters are missing: directory
> at io.airlift.airline.Cli.validate(Cli.java:144)
> at io.airlift.airline.Cli.parse(Cli.java:116)
> at io.airlift.airline.Cli.parse(Cli.java:97)
> at org.apache.activemq.artemis.cli.Artemis.main(Artemis.java:68)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:116)
> {code}
> I think we should make this nicer so there is no stacktraces returned for invalid or missing user input.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)