Skip to content

Commit 9041e60

Browse files
authored
[IOTDB-17191] CLI: add space after error prefix in three messages (#17192)
1 parent 6ea3052 commit 9041e60

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

  • iotdb-client/cli/src/main/java/org/apache/iotdb/cli

iotdb-client/cli/src/main/java/org/apache/iotdb/cli/Cli.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ public static void runCli(CliContext ctx, String[] args)
9191
port = checkRequiredArg(ctx, PORT_ARGS, PORT_NAME, commandLine, false, port);
9292
username = checkRequiredArg(ctx, USERNAME_ARGS, USERNAME_NAME, commandLine, true, null);
9393
} catch (ArgsErrorException e) {
94-
ctx.getPrinter().println(IOTDB_ERROR_PREFIX + "Input params error because" + e.getMessage());
94+
ctx.getPrinter()
95+
.println(IOTDB_ERROR_PREFIX + ": Input params error because " + e.getMessage());
9596
ctx.exit(CODE_ERROR);
9697
} catch (Exception e) {
97-
ctx.getPrinter().println(IOTDB_ERROR_PREFIX + "Exit cli with error " + e.getMessage());
98+
ctx.getPrinter().println(IOTDB_ERROR_PREFIX + ": Exit cli with error: " + e.getMessage());
9899
ctx.exit(CODE_ERROR);
99100
}
100101
LineReader lineReader = JlineUtils.getLineReader(ctx, username, host, port);
@@ -188,7 +189,8 @@ private static void executeSql(CliContext ctx) throws TException {
188189
processCommand(ctx, execute, connection);
189190
ctx.exit(lastProcessStatus);
190191
} catch (SQLException e) {
191-
ctx.getPrinter().println(IOTDB_ERROR_PREFIX + "Can't execute sql because" + e.getMessage());
192+
ctx.getPrinter()
193+
.println(IOTDB_ERROR_PREFIX + ": Can't execute sql because " + e.getMessage());
192194
ctx.exit(CODE_ERROR);
193195
}
194196
}

0 commit comments

Comments
 (0)