Remove dynamic exceptions
[anna.git] / source / core / mt / Guard.cpp
index 259526a..e3c5575 100644 (file)
@@ -29,7 +29,7 @@ using namespace anna;
       Logger::write (Logger::Local7, msg, (file), (line)); \
    }
 
-Guard::Guard(const Safe* object) throw(RuntimeException) :
+Guard::Guard(const Safe* object) noexcept(false) :
   a_whatis(NULL) {
   if(object == NULL)
     throw RuntimeException("Can not lock NULL object", ANNA_FILE_LOCATION);
@@ -37,7 +37,7 @@ Guard::Guard(const Safe* object) throw(RuntimeException) :
   lock(a_safeObject = const_cast <Safe*>(object), NULL);
 }
 
-Guard::Guard(const Safe* object, const char* whatis) throw(RuntimeException) :
+Guard::Guard(const Safe* object, const char* whatis) noexcept(false) :
   a_whatis(whatis) {
   if(object == NULL)
     throw RuntimeException("Can not lock NULL object", ANNA_FILE_LOCATION);
@@ -46,7 +46,7 @@ Guard::Guard(const Safe* object, const char* whatis) throw(RuntimeException) :
 }
 
 void Guard::deactivate()
-throw() {
+{
   if(a_safeObject == NULL)
     return;
 
@@ -60,7 +60,7 @@ throw() {
 // Logger::writer tambien usa una Guard.
 //--------------------------------------------------------------------------------------------------------------
 void Guard::lock(Safe* safe, const char* whatis)
-throw(RuntimeException) {
+noexcept(false) {
   trace_local7("Guard::lock", safe, __FILE__, __LINE__);
   safe->lock();
 }