You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by "Jialin Qiao (Jira)" <ji...@apache.org> on 2020/02/02 11:20:00 UTC

[jira] [Closed] (IOTDB-161) ERROR code is needed.

     [ https://issues.apache.org/jira/browse/IOTDB-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jialin Qiao closed IOTDB-161.
-----------------------------
    Fix Version/s: 0.9.0
       Resolution: Fixed

> ERROR code is needed.
> ---------------------
>
>                 Key: IOTDB-161
>                 URL: https://issues.apache.org/jira/browse/IOTDB-161
>             Project: Apache IoTDB
>          Issue Type: Task
>            Reporter: xiangdong Huang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Now I think it is time to introduce error code.. 
> For example, as IoTDB requires registering the time series first before writing data, a kind of solution is:
> ```
> try{
>   writeData();
> } catch (SQLException e) {
>   // the most case is that the time series does not exist.
>   if (e.getMessage().contains("exist")) {
>      //However, using the content of the error message  is not so efficient  
>     registerTimeSeries();
>     //write data once again
>     writeData();
>   }
> }
> ```
> If we have error code, then we do not need to write ugly codes like ` if (e.getMessage().contains("exist")) ` any more.
>  
> Some needed error codes that I can consider include:
>  * create time series failed because there is no related storage group for the given time series;
>  * insert/query failed because the time series does not exist
>  * insert/query failed because the value format is incorrect
>  * sql parse error
>  
>  
>  
>  
>  



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