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

Enhancement: More user-friendly error message #637

Closed
1 of 2 tasks
gogim1 opened this issue Jun 17, 2022 · 1 comment · Fixed by #1217
Closed
1 of 2 tasks

Enhancement: More user-friendly error message #637

gogim1 opened this issue Jun 17, 2022 · 1 comment · Fixed by #1217
Labels
enhancement type enhancement help wanted Good for newcomers

Comments

@gogim1
Copy link
Contributor

gogim1 commented Jun 17, 2022

Search before asking

  • I had searched in the issues and found no similar issues.

Motivation

I get two kinds of error messages when I exec kvrock2redis like this:

  • if the data-dir in config file is an unexist path, it shows Failed to load config, err: NotFound:
  • if the config file is not found, it shows Failed to load config, err: No such file or directory

I think it need a more accurate error message to distinguish this two cases.

Solution

Maybe the simpliest way to solve this problem is to append + data_dir after s.ToString():
https://github.com/apache/incubator-kvrocks/blob/c391953f92fc03b4d22e100a42024a898f3fae47/tools/kvrocks2redis/config.cc#L143

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@gogim1 gogim1 added the enhancement type enhancement label Jun 17, 2022
@git-hulk
Copy link
Member

This improvement makes sense to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type enhancement help wanted Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants