You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/08/10 11:56:10 UTC

[GitHub] [incubator-kvrocks] wy-ei commented on pull request #768: Add `StatusOr` for error handling in modern C++ style

wy-ei commented on PR #768:
URL: https://github.com/apache/incubator-kvrocks/pull/768#issuecomment-1210570826

   @PragmaTwice 
   
   If using exception to report error instead of status, we don't need Status and this StatusOr at all.
   
   What is the better way to report error in C++? error code or exception? There are many posts discuss this question, here are some of them:
   
   - [https://isocpp.org/wiki/faq/exceptions](https://isocpp.org/wiki/faq/exceptions)
   - [https://stackoverflow.com/questions/253314/conventions-for-exceptions-or-error-codes](https://stackoverflow.com/questions/253314/conventions-for-exceptions-or-error-codes)


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