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

Xiangdong Huang commented on IOTDB-549:
---------------------------------------

Hi,

I also think the exception types need to be re-organized in Session APIs.

If you read my PR [1], you may find how I suffer from the exceptions.
 # Some session APIs return `IoTDBSessionException`;
 # Others return `IoTDBRPCException` and `TException`;

What is the difference between IoTDBSessionException and `IoTDBRPCException`?  
All of these APIs are RPC APIs.

In my opinion, there are 3 kinds of exceptions that users need to handle 
separately:
 # Network Exception, like TException or TTransportException.  When there is a 
network problem, users have to stop the program or re-connect to the server.
 # Execution Exception, e.g., users send an incorrect SQL, or some other issues 
happen. In this case, users may need to change their SQLs.
 # Server internal error. The server does not need to tell users the detailed 
info, but the server must tell the user there is an error. In this case, the 
user may have to stop the program.

 

[1][https://github.com/apache/incubator-iotdb/pull/880]

 

 

> TApplicationException is thrown when input sql is not correct
> -------------------------------------------------------------
>
>                 Key: IOTDB-549
>                 URL: https://issues.apache.org/jira/browse/IOTDB-549
>             Project: Apache IoTDB
>          Issue Type: Bug
>    Affects Versions: 0.10.0-SNAPSHOT
>            Reporter: Duan Tianyang
>            Priority: Major
>         Attachments: 1.png, 2.png, 3.png, 4.png
>
>
> When user input wrong script, executeQueryStatement method sometimes throws 
> an TApplicationException without messages to explain the sql error. I 
> observed that it happens when the latter part (after "select") of the sql 
> script is wrong. I tried some script in SessionExample.java  they've got the 
> same result (see attachments). 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to