Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions iotdb-client/cli/src/main/java/org/apache/iotdb/cli/Cli.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
ctx.exit(CODE_ERROR);
}
LineReader lineReader = JlineUtils.getLineReader(ctx, username, host, port);
Expand Down Expand Up @@ -189,7 +190,8 @@ private static void executeSql(CliContext ctx) throws TException {
processCommand(ctx, execute, connection);
ctx.exit(lastProcessStatus);
} catch (SQLException e) {
ctx.getPrinter().println(IOTDB_ERROR_PREFIX + "Can't execute sql because" + e.getMessage());
ctx.getPrinter()
.println(IOTDB_ERROR_PREFIX + ": Can't execute sql because " + e.getMessage());
ctx.exit(CODE_ERROR);
}
}
Expand Down