You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/01/22 16:53:35 UTC

[GitHub] [incubator-brpc] lorinlee commented on a change in pull request #1669: Fix C++ compile issue and clang compile issue

lorinlee commented on a change in pull request #1669:
URL: https://github.com/apache/incubator-brpc/pull/1669#discussion_r790160919



##########
File path: src/bthread/mutex.h
##########
@@ -48,15 +48,15 @@ class Mutex {
     Mutex() {
         int ec = bthread_mutex_init(&_mutex, NULL);
         if (ec != 0) {
-            throw std::system_error(std::error_code(ec, std::system_category()), "Mutex constructor failed");
+            CHECK(false) << "Mutex constructor failed";
         }
     }
     ~Mutex() { CHECK_EQ(0, bthread_mutex_destroy(&_mutex)); }
     native_handler_type native_handler() { return &_mutex; }
     void lock() {
         int ec = bthread_mutex_lock(&_mutex);
         if (ec != 0) {
-            throw std::system_error(std::error_code(ec, std::system_category()), "Mutex lock failed");

Review comment:
       Hi @x2c3z4 , Thanks for your contribution! But I have a small question, why remove the exception here, it was been added by #645




-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org