Skip to content

Conversation

@miantalha45
Copy link
Contributor

What's changed

Adds the missing separator after IOTDB_ERROR_PREFIX ("Error") in three CLI error messages so they display as "Error: ..." instead of "Error...".

Changes

  • ArgsErrorException (init): Error + : Input params error because + message
  • Exception (init): Error + : Exit cli with error + message
  • SQLException (executeSql): Error + : Can't execute sql because + message

Fixes #17191

- ArgsErrorException: 'Error' + ': Input params error because '
- Exception on init: 'Error' + ': Exit cli with error '
- SQLException in executeSql: 'Error' + ': Can't execute sql because '

Fixes missing space after IOTDB_ERROR_PREFIX so messages display as
'Error: ...' instead of 'Error...'.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes CLI error output formatting by adding a ": " separator after IOTDB_ERROR_PREFIX so affected messages render as Error: ... instead of Error..., addressing #17191.

Changes:

  • Add ": " after IOTDB_ERROR_PREFIX for argument parsing errors.
  • Add ": " after IOTDB_ERROR_PREFIX for generic CLI exit errors during startup.
  • Add ": " after IOTDB_ERROR_PREFIX for SQL execution errors in executeSql().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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());
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
ctx.getPrinter().println(IOTDB_ERROR_PREFIX + ": Exit cli with error " + e.getMessage());
ctx.getPrinter().println(IOTDB_ERROR_PREFIX + ": Exit cli with error: " + e.getMessage());

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] CLI: missing space after error prefix in three error messages

1 participant