From dd13618845d0a226a1f294675b6466493f91026e Mon Sep 17 00:00:00 2001 From: tomoaki Date: Tue, 11 May 2021 13:57:22 +0900 Subject: [PATCH] Add Exception message to Mutex Signed-off-by: tomoaki --- MQTTSNGateway/src/linux/Threading.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MQTTSNGateway/src/linux/Threading.cpp b/MQTTSNGateway/src/linux/Threading.cpp index 9fe834e..4341034 100644 --- a/MQTTSNGateway/src/linux/Threading.cpp +++ b/MQTTSNGateway/src/linux/Threading.cpp @@ -131,11 +131,11 @@ void Mutex::lock(void) { if (pthread_mutex_lock(&_mutex)) { - throw; + throw Exception("Mutex lock error", errno); } } catch (char* errmsg) { - throw Exception("The same thread can't acquire a mutex twice.", -1); + throw Exception("The same thread can't acquire a mutex twice", errno); } } } @@ -153,7 +153,7 @@ void Mutex::unlock(void) { if (pthread_mutex_unlock(&_mutex)) { - throw; + throw Exception("Mutex unlock error", errno); } } catch (char* errmsg) {