Copilot commented on code in PR #17192:
URL: https://github.com/apache/iotdb/pull/17192#discussion_r2785344166
##########
iotdb-client/cli/src/main/java/org/apache/iotdb/cli/Cli.java:
##########
@@ -91,10 +91,11 @@ public static void runCli(CliContext ctx, String[] args)
port = checkRequiredArg(ctx, PORT_ARGS, PORT_NAME, commandLine, false,
port);
username = checkRequiredArg(ctx, USERNAME_ARGS, USERNAME_NAME,
commandLine, true, null);
} catch (ArgsErrorException e) {
- ctx.getPrinter().println(IOTDB_ERROR_PREFIX + "Input params error
because" + e.getMessage());
+ ctx.getPrinter()
+ .println(IOTDB_ERROR_PREFIX + ": Input params error because " +
e.getMessage());
ctx.exit(CODE_ERROR);
} catch (Exception e) {
- ctx.getPrinter().println(IOTDB_ERROR_PREFIX + "Exit cli with error " +
e.getMessage());
+ ctx.getPrinter().println(IOTDB_ERROR_PREFIX + ": Exit cli with error " +
e.getMessage());
Review Comment:
The message here says "Exit cli with error " followed immediately by the
exception message, while `serve()` below prints "Exit cli with error: " (note
the colon). Consider aligning these so the output is consistent and easier to
read (e.g., include the colon before the exception message).
```suggestion
ctx.getPrinter().println(IOTDB_ERROR_PREFIX + ": Exit cli with error:
" + e.getMessage());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]