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 6CBD211B37 for ; Thu, 3 Jul 2014 15:34:25 +0000 (UTC) Received: (qmail 21937 invoked by uid 500); 3 Jul 2014 15:34:25 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 21900 invoked by uid 500); 3 Jul 2014 15:34:25 -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 21884 invoked by uid 99); 3 Jul 2014 15:34:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jul 2014 15:34:25 +0000 Date: Thu, 3 Jul 2014 15:34:25 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-7111) Include snippet of CQL query near error in SyntaxError messages 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-7111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-7111: ---------------------------------------- Reviewer: Tyler Hobbs (was: Sylvain Lebresne) > Include snippet of CQL query near error in SyntaxError messages > --------------------------------------------------------------- > > Key: CASSANDRA-7111 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7111 > Project: Cassandra > Issue Type: Improvement > Components: API, Tools > Reporter: Tyler Hobbs > Assignee: Benjamin Lerer > Labels: cql > Fix For: 2.1.1 > > Attachments: CASSANDRA-7111-1.txt, CASSANDRA-7111-2.txt > > > When a SyntaxError is returned, including a snippet of the query close to the error would make a lot of error messages easier to understand. For example, if you did this with the python driver: > {code} > session.execute(SELECT * FROM users WHERE username='%s', ['Joe Smith']) > {code} > you would wind up with an extra set of single quotes (the driver automatically escapes and quotes input). If a snippet like {{...WHERE username=''Joe Smith''}} were included in the error message, this would be pretty easy to spot. -- This message was sent by Atlassian JIRA (v6.2#6252)