> -----Original Message-----
> From: Christofer Dutz <christofer.d...@c-ware.de>
> Sent: Monday, July 15, 2024 1:03 PM
> To: dev@iotdb.apache.org
> Subject: [DISCUSS] Clean handling of issues in CLIs?
> 
> Hi all,
> 
> also while working on the DataNodeServerCli I noticed that we don't
> actually handle how CLIs deal with issues correctly.
> While in most case in case of a successful operation we return a code of 0,
> we don't consequently do this in case of issues.
> Sometimes we return -1 or other cases, but in most cases we simply fire
> exceptions that terminate the CLI.
> 
> I think we should define a set of globally adopted return codes and
> consequently catch and handle all exceptions that could occur in CLIs and
> map these to these standard return codes and log readable messages instead
> of dumping stack-traces.
> 
> While for a human running these scripts, the stacktrace usually should
> provide enough information, they might be overwhelmed by chains of
> stacktraces ... also does a process calling these scripts don't know how to
> interpret them.
> 
> What do you think?

+1 for this idea.

Particularly if the IoTDB client CLI is affected as it will be a common
method for newbies trying out IoTDB, as well as being used in scripting.

I refer to its use in the COVESA Central Data Service Playground documentation
as it fits interactive trials, and this will increase as we add more examples.

Best Wishes,

Steve

Reply via email to