You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "PragmaTwice (via GitHub)" <gi...@apache.org> on 2023/05/03 06:59:59 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #1416: common/ParseUtil replace erro msgs with error integers

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: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org