Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9E4649A99 for ; Wed, 5 Oct 2011 07:02:58 +0000 (UTC) Received: (qmail 44731 invoked by uid 500); 5 Oct 2011 07:02:58 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 44716 invoked by uid 500); 5 Oct 2011 07:02:58 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 44708 invoked by uid 99); 5 Oct 2011 07:02:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 07:02:58 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 07:02:55 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0ED712A9A7E for ; Wed, 5 Oct 2011 07:02:34 +0000 (UTC) Date: Wed, 5 Oct 2011 07:02:34 +0000 (UTC) From: "satish babu krishnamoorthy (Updated) (JIRA)" To: commits@cassandra.apache.org Message-ID: <1508365496.10734.1317798154062.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <431862012.10368.1317781354016.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CASSANDRA-3312) need initClause when catch Exception and throw new Exception in cli MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CASSANDRA-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] satish babu krishnamoorthy updated CASSANDRA-3312: -------------------------------------------------- Attachment: 3312.patch Added patch to support more exceptional details > need initClause when catch Exception and throw new Exception in cli > ------------------------------------------------------------------- > > Key: CASSANDRA-3312 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3312 > Project: Cassandra > Issue Type: Bug > Affects Versions: 1.0.1 > Reporter: Jackson Chung > Assignee: Pavel Yaskevich > Priority: Minor > Attachments: 3312.patch > > > through CASSANDRA-2746 , we added initCause to the Cli such that we could see more meaningful exception stacktrace when certain exception is thrown. > However, there are still some other area, eg: > executeGetWithConditions(Tree) > executeSet(Tree) > executeIncr(Tree, long) > etc etc... > basically any time you do a > {code} > { > throw new RuntimeException(e.getMessage()); > } > {code} > the real exception is lost. The right approach should be: > {code} > catch (Exception e) > { > throw new RuntimeException(e.getMessage(), e); > } > {code} > eg: i was getting this: > null > java.lang.RuntimeException > at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:310) > at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217) > at org.apache.cassandra.cli.CliMain.main(CliMain.java:345) > Caused by: java.lang.RuntimeException > at org.apache.cassandra.cli.CliClient.executeGetWithConditions(CliClient.java:815) > at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:208) > ... 2 more > but i have no idea what the problem is with just the above stack trace. > with the fix, this would tell us more: > null > java.lang.RuntimeException > at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:310) > at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217) > at org.apache.cassandra.cli.CliMain.main(CliMain.java:345) > Caused by: java.lang.RuntimeException > at org.apache.cassandra.cli.CliClient.executeGetWithConditions(CliClient.java:815) > at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:208) > ... 2 more > Caused by: UnavailableException() > at org.apache.cassandra.thrift.Cassandra$get_indexed_slices_result.read(Cassandra.java:14065) > at org.apache.cassandra.thrift.Cassandra$Client.recv_get_indexed_slices(Cassandra.java:810) > at org.apache.cassandra.thrift.Cassandra$Client.get_indexed_slices(Cassandra.java:782) > at org.apache.cassandra.cli.CliClient.executeGetWithConditions(CliClient.java:806) > ... 3 more -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira