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