PragmaTwice commented on issue #1416:
URL: 
https://github.com/apache/incubator-kvrocks/issues/1416#issuecomment-1532544345

   I think it seems not necessary to create status codes for every parsing 
error type. In kvrocks, a better and sample solution already exists:
   ```
   auto version = ParseInt<VersionInteger>(version_str);
   if (!version) {
     return version.Prefixed("failed to parse version");
   }
   ```
   
   Then users will get a well-formed error message, like `failed to parse 
version: out of range` or `failed to parse version: encounter non-digit 
characters`.


-- 
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