From 752e1ab98b674ba98985c71acbc8092af74d1fad Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Mon, 6 Jul 2020 12:08:25 +0200 Subject: [PATCH] Removed the exception throw in the destructor in case of error. --- src/mutex/mutex.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/mutex/mutex.cpp b/src/mutex/mutex.cpp index f4dbee4..e49f1f7 100644 --- a/src/mutex/mutex.cpp +++ b/src/mutex/mutex.cpp @@ -74,13 +74,7 @@ void CMutex::exit(void) CMutex::~CMutex() { - int error=0; - this->try_enter(); this->exit(); - if((error=pthread_mutex_destroy(&this->access))!=0) - { - /* handle exception */ - throw CMutexException(_HERE_,"Impossible to destroy the mutex.\n"); - } + pthread_mutex_destroy(&this->access); } -- GitLab