kvrocks
kvrocks copied to clipboard
Enhancement: More user-friendly error message
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-dirin config file is an unexist path, it showsFailed 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!
This improvement makes sense to me