Return-Path: X-Original-To: apmail-kafka-dev-archive@www.apache.org Delivered-To: apmail-kafka-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B0D5174BE for ; Thu, 1 Oct 2015 13:08:27 +0000 (UTC) Received: (qmail 25164 invoked by uid 500); 1 Oct 2015 13:08:26 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 25086 invoked by uid 500); 1 Oct 2015 13:08:26 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 25075 invoked by uid 99); 1 Oct 2015 13:08:26 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2015 13:08:26 +0000 Date: Thu, 1 Oct 2015 13:08:26 +0000 (UTC) From: "Gabriel Nicolas Avellnaeda (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-2601) ConsoleProducer tool shows stacktrace on invalid command parameters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-2601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14939785#comment-14939785 ] Gabriel Nicolas Avellnaeda commented on KAFKA-2601: --------------------------------------------------- Hi [~eribeiro], Yeap, easy fix, I will do a PR right now, Thanks you! > ConsoleProducer tool shows stacktrace on invalid command parameters > ------------------------------------------------------------------- > > Key: KAFKA-2601 > URL: https://issues.apache.org/jira/browse/KAFKA-2601 > Project: Kafka > Issue Type: Bug > Components: tools > Affects Versions: 0.8.2.1 > Reporter: Gabriel Nicolas Avellnaeda > Priority: Minor > Labels: easyfix > > Running kafka-console-producer tool with an invalid argument shows a full stack trace instead of a user-friendly error: > {code} > vagrant@vagrant-ubuntu-trusty-64:/vagrant/kafka/kafka_2.9.1-0.8.2.1$ bin/kafka-console-producer.sh --zookeeper localhost:2181 --topic another-topic > Exception in thread "main" joptsimple.UnrecognizedOptionException: 'zookeeper' is not a recognized option > at joptsimple.OptionException.unrecognizedOption(OptionException.java:93) > at joptsimple.OptionParser.handleLongOptionToken(OptionParser.java:402) > at joptsimple.OptionParserState$2.handleArgument(OptionParserState.java:55) > at joptsimple.OptionParser.parse(OptionParser.java:392) > at kafka.tools.ConsoleProducer$ProducerConfig.(ConsoleProducer.scala:216) > at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:35) > at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)