Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format CLI error messages #18346

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Conversation

wendigo
Copy link
Contributor

@wendigo wendigo commented Jul 19, 2023

When an exception is raised either during query execution or parsing command line arguments in the CLI the output is now formatted:

Screenshot 2023-07-19 at 16 08 24 Screenshot 2023-07-19 at 15 49 35

--debug option is taken into the account to expand exception stack trace

Release notes:

# CLI
* Format error messages and hide stack traces behind `--debug` flag by default

@wendigo wendigo requested a review from mosabua July 19, 2023 14:10
@cla-bot cla-bot bot added the cla-signed label Jul 19, 2023
Copy link
Member

@mosabua mosabua left a comment

Choose a reason for hiding this comment

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

Just a code style question.. rest looks good

client/trino-cli/src/main/java/io/trino/cli/Trino.java Outdated Show resolved Hide resolved
client/trino-cli/src/main/java/io/trino/cli/Trino.java Outdated Show resolved Hide resolved
@mosabua
Copy link
Member

mosabua commented Jul 19, 2023

Also @wendigo .. please add a suggested release notes entry to the description.

@wendigo wendigo force-pushed the serafin/formatted-cli-errors branch from 06db394 to 46740f9 Compare July 19, 2023 16:30
Error message is now colored in red to be more descriptive.

Stacktrace is displayed when --debug command line option is used.
@wendigo wendigo force-pushed the serafin/formatted-cli-errors branch from 46740f9 to c597618 Compare July 19, 2023 19:27
@wendigo
Copy link
Contributor Author

wendigo commented Jul 19, 2023

@mosabua PTAL at the release note

@mosabua
Copy link
Member

mosabua commented Jul 19, 2023

@mosabua PTAL at the release note

Looks good

@wendigo wendigo merged commit fb98721 into trinodb:master Jul 20, 2023
@wendigo wendigo deleted the serafin/formatted-cli-errors branch July 20, 2023 10:43
@github-actions github-actions bot added this to the 423 milestone Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants