You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Paschenko (JIRA)" <ji...@apache.org> on 2017/09/15 10:51:00 UTC
[jira] [Comment Edited] (IGNITE-5620) Meaningful error codes and
types of exceptions for SQL operations
[ https://issues.apache.org/jira/browse/IGNITE-5620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16167697#comment-16167697 ]
Alexander Paschenko edited comment on IGNITE-5620 at 9/15/17 10:50 AM:
-----------------------------------------------------------------------
[~vozerov]
{{CONNECTION_ERROR}} - miscellaneous connection error (I use this when, say, because of malformed connection string we can't even attempt to connect).
{{CLIENT_CONNECTION_FAILED}} - connection params are fine, but connection can't be established.
{{CONNECTION_FAILURE}} - runtime error on a connection that has been successfully opened before.
was (Author: al.psc):
[~vozerov]
CONNECTION_ERROR - miscellaneous connection error (I use this when, say, because of malformed connection string we can't even attempt to connect).
CLIENT_CONNECTION_FAILED - connection params are fine, but connection can't be established.
CONNECTION_FAILURE - runtime error on a connection that has been successfully opened before.
> Meaningful error codes and types of exceptions for SQL operations
> ------------------------------------------------------------------
>
> Key: IGNITE-5620
> URL: https://issues.apache.org/jira/browse/IGNITE-5620
> Project: Ignite
> Issue Type: Task
> Components: sql
> Affects Versions: 2.0
> Reporter: Denis Magda
> Assignee: Alexander Paschenko
> Labels: usability
> Fix For: 2.3
>
>
> Presently, SQL engine throws a generic type of exception with custom text in case of an operation failure. In result, Ignite ODBC driver returns a similar error code (2000) for different kind of failures.
> For example, error code 2000 is returned for the following
> {code}
> Duplicate key during INSERT [key=CorpcontactcountKey [idHash=1412656257, hash=2004096461, mdn=919200000000]]
> {code}
> {code}
> Failed to parse query: INSERT INTO "DG".Corpcontactcount (mdn,contactcount,lastupdatetime)
> values(?,?,?,?)
> {code}
> {code}
> Wrong value has been set [typeName=Pocsubscrinfo, fieldName=vocoderid, fieldType=short, assignedValueType=byte] Error Code: 2000
> {code}
> The following has to be done:
> * Create unique types of exceptions for Java whenever applicable.
> * Add {{errorCode}} parameter and method to a generic SQL exception.
> * ODBC and JDBC drivers have to return unique codes based on the exception code or type.
> * All the codes have to be documented on readme.io.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)