cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7111) Include snippet of CQL query near error in SyntaxError messages
Date Wed, 30 Apr 2014 17:40:18 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-7111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13985794#comment-13985794
] 

Sylvain Lebresne commented on CASSANDRA-7111:
---------------------------------------------

Yeah, I don't think we've ever promised not changing error messages, and even those maverick
drivers that do parse error message probably just pattern match part of the message, so adding
this wouldn't break them probably. So I wouldn't mind doing this even in 2.0 if the patch
is trivial, which I think it will. The convenience it might bring to most users outweighs
the very remote risk of breaking 1 or 2 users imo.

> 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
>             Fix For: 2.1 rc1
>
>
> 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)

Mime
View raw message