kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Enhancement: More user-friendly error message

Open gogim1 opened this issue 3 years ago • 1 comments

Search before asking

  • [X] 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 avatar Jun 17 '22 08:06 gogim1

This improvement makes sense to me

git-hulk avatar Jun 17 '22 10:06 git-hulk