infdahai opened a new issue, #1416:
URL: https://github.com/apache/incubator-kvrocks/issues/1416

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-kvrocks/issues) and found no 
similar issues.
   
   
   ### Motivation
   
   for exmaple, one instantiation of ParseInt presents below.
   
   
https://github.com/apache/incubator-kvrocks/blob/30e9fd788a4acb585566a008f4d5fff65ee06ce3/src/common/parse_util.h#L113-L125
   
   We can't get a more detailed information about what `v` meanings in Parse() 
func and just think it as an non-integer error if the parsing occurs the error.
   
   I view the source code about calling `ParseInt`(or `ParseType`) functions 
and find that we use the parse  function without taking advantage of the info 
from error msgs.
   
   ```cpp
        auto parse_result = ParseInt<int64_t>(args[3], 10);
         if (!parse_result) {
           return {Status::RedisParseErr, "Invalid version"};
         }
   ```
   
   We can provide an exact error msg actually, such as `out of range about the 
version`, `illegal character of the 'version' str`.
   
   This is a issue for helpful msgs, so it is not necessary.
   
   
   ### Solution
   
   It needs a lot of work here.
   
   we just defines different error types in parse_util module and the concrete 
caller use the type to modify error-msgs.
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to