Remove dynamic exceptions
[anna.git] / source / core / util / Environment.cpp
index 63d1626..7ab71e2 100644 (file)
@@ -23,7 +23,7 @@ using namespace anna;
 
 extern int errno;
 
-void Environment::initialize(char **envp) throw() {
+void Environment::initialize(char **envp) {
   LOGMETHOD(TraceMethod tm("Environment", "initialize", ANNA_FILE_LOCATION));
   // clear data
   a_vars.clear();
@@ -47,7 +47,7 @@ void Environment::initialize(char **envp) throw() {
   }
 }
 
-std::string Environment::getValue(const char* variableName, bool exceptionIfMissing) throw(RuntimeException) {
+std::string Environment::getValue(const char* variableName, bool exceptionIfMissing) noexcept(false) {
   if(!variableName)
     throw RuntimeException("Invalid NULL variable name!", ANNA_FILE_LOCATION);
 
@@ -55,7 +55,7 @@ std::string Environment::getValue(const char* variableName, bool exceptionIfMiss
   return getValue(var, exceptionIfMissing);
 }
 
-std::string Environment::getValue(const std::string &variableName, bool exceptionIfMissing) throw(RuntimeException) {
+std::string Environment::getValue(const std::string &variableName, bool exceptionIfMissing) noexcept(false) {
   std::string result = "";
   std::map<std::string, std::string>::const_iterator it = a_vars.find(variableName);
 
@@ -82,7 +82,7 @@ std::string Environment::getValue(const std::string &variableName, bool exceptio
 }
 
 
-void Environment::setVariable(const std::string &name, const std::string &value, bool overwrite) throw(RuntimeException) {
+void Environment::setVariable(const std::string &name, const std::string &value, bool overwrite) noexcept(false) {
   if(name == "") throw RuntimeException("Must provide non-empty variable name", ANNA_FILE_LOCATION);
 
   if(setenv(name.c_str(), value.c_str(), overwrite ? 1 : 0) != 0) {
@@ -101,7 +101,7 @@ void Environment::setVariable(const std::string &name, const std::string &value,
 }
 
 
-void Environment::unsetVariable(const std::string &name) throw(RuntimeException) {
+void Environment::unsetVariable(const std::string &name) noexcept(false) {
   if(name == "") throw RuntimeException("Must provide non-empty variable name", ANNA_FILE_LOCATION);
 
   if(unsetenv(name.c_str()) != 0) {