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 ED0B610AEA for ; Fri, 16 Jan 2015 14:41:32 +0000 (UTC) Received: (qmail 32744 invoked by uid 500); 16 Jan 2015 14:41:34 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 32706 invoked by uid 500); 16 Jan 2015 14:41:34 -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 32695 invoked by uid 99); 16 Jan 2015 14:41:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jan 2015 14:41:34 +0000 Date: Fri, 16 Jan 2015 14:41:34 +0000 (UTC) From: "Robert Stupp (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-8560) Make CassandraException be an unchecked exception 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/CASSANDRA-8560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-8560: ------------------------------------ Assignee: Robert Stupp > Make CassandraException be an unchecked exception > ------------------------------------------------- > > Key: CASSANDRA-8560 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8560 > Project: Cassandra > Issue Type: Improvement > Reporter: Sylvain Lebresne > Assignee: Robert Stupp > Priority: Minor > Fix For: 3.0 > > > {{CassandraException}} (which is the base class of our query validation and execution exception, including {{InvalidRequestException}}, {{UnavailableException}}, ...) is a checked exception. Those exceptions are pervasive and are rarely meant to be caught within Cassandra since they are meant for reporting problems to the end user and so I'm not convinced the benefit of checked exceptions outweight the cost of having to put throws everywhere. > Concretely, the fact that these are checked exception is currently a pain for 2 outstanding tickets: > * CASSANDRA-8528: as Robert put it, it forces to "touch half of the source files just to add a throws/catch even in code that can never use UDFs" > * CASSANDRA-8099: the ticket transform some code (in StorageProxy for instance) to iterators, but an iterator can't throw checked exception. In fact, the current WIP patch for that ticket already switch {{CassandraException}} to extend {{RuntimeException}} for that very reason. > I understand that "checked" vs "unchecked" exceptions is an old debate with proponent of both camp, but I'm pretty sure the costs of checked outweight the cons in that case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)