[ https://issues.apache.org/jira/browse/ROCKETMQ-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15885023#comment-15885023 ]
ASF GitHub Bot commented on ROCKETMQ-104: ----------------------------------------- Github user vongosling commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/65#discussion_r103126511 --- Diff: tools/src/main/java/org/apache/rocketmq/tools/command/offset/ResetOffsetByTimeCommand.java --- @@ -22,25 +22,16 @@ import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; -import org.apache.commons.cli.PosixParser; import org.apache.rocketmq.client.exception.MQClientException; import org.apache.rocketmq.common.UtilAll; import org.apache.rocketmq.common.message.MessageQueue; import org.apache.rocketmq.common.protocol.ResponseCode; import org.apache.rocketmq.remoting.RPCHook; -import org.apache.rocketmq.srvutil.ServerUtil; import org.apache.rocketmq.tools.admin.DefaultMQAdminExt; import org.apache.rocketmq.tools.command.SubCommand; +import org.apache.rocketmq.tools.command.SubCommandException; public class ResetOffsetByTimeCommand implements SubCommand { - public static void main(String[] args) { --- End diff -- +1 > Make MQAdmin commands throw exceptions > -------------------------------------- > > Key: ROCKETMQ-104 > URL: https://issues.apache.org/jira/browse/ROCKETMQ-104 > Project: Apache RocketMQ > Issue Type: Improvement > Reporter: Roman Shtykh > Assignee: Roman Shtykh > > *Why to throw exceptions?* > With the current implementation you don't know if the command fails unless > you look at console. This is one reason why errors in unit tests like in > ROCKETMQ-77 can go unnoticed. > If stack tracing is still needed, we can add logging when throwing exceptions. -- This message was sent by Atlassian JIRA (v6.3.15#6346)