Remove dynamic exceptions
[anna.git] / source / core / util / Variable.cpp
index 60fdd6a..3145725 100644 (file)
@@ -54,35 +54,35 @@ Variable::~Variable() {
 }
 
 void Variable::setValue(const char* value)
-throw(RuntimeException) {
+noexcept(false) {
   verifyMatchType(Type::String, ANNA_FILE_LOCATION);
   a_isNull = false;
   *a_value.a_string = value;
 }
 
 void Variable::setValue(const int value)
-throw(RuntimeException) {
+noexcept(false) {
   verifyMatchType(Type::Integer, ANNA_FILE_LOCATION);
   a_isNull = false;
   *a_value.a_integer = value;
 }
 
 void Variable::setValue(const S64 value)
-throw(RuntimeException) {
+noexcept(false) {
   verifyMatchType(Type::Integer64, ANNA_FILE_LOCATION);
   a_isNull = false;
   *a_value.a_longInteger = value;
 }
 
 void Variable::setValue(const bool value)
-throw(RuntimeException) {
+noexcept(false) {
   verifyMatchType(Type::Boolean, ANNA_FILE_LOCATION);
   a_isNull = false;
   *a_value.a_boolean = value;
 }
 
 void Variable::setValue(const DataBlock& value)
-throw(RuntimeException) {
+noexcept(false) {
   verifyMatchType(Type::Block, ANNA_FILE_LOCATION);
 
   if(a_value.a_dataBlock->deepCopy() == false) {
@@ -97,7 +97,7 @@ throw(RuntimeException) {
 }
 
 void Variable::setValue(const float value)
-throw(RuntimeException) {
+noexcept(false) {
   verifyMatchSomeType(Type::Float, Type::Double, ANNA_FILE_LOCATION);
 
   if(a_type == Type::Float) {
@@ -110,7 +110,7 @@ throw(RuntimeException) {
 }
 
 void Variable::setValue(const double value)
-throw(RuntimeException) {
+noexcept(false) {
   verifyMatchSomeType(Type::Float, Type::Double, ANNA_FILE_LOCATION);
 
   if(a_type == Type::Float) {
@@ -123,21 +123,21 @@ throw(RuntimeException) {
 }
 
 const char* Variable::getStringValue() const
-throw(RuntimeException) {
+noexcept(false) {
   verifyIsNotNull(ANNA_FILE_LOCATION);
   verifyMatchType(Type::String, ANNA_FILE_LOCATION);
   return a_value.a_string->c_str();
 }
 
 int Variable::getIntegerValue() const
-throw(RuntimeException) {
+noexcept(false) {
   verifyIsNotNull(ANNA_FILE_LOCATION);
   verifyMatchType(Type::Integer, ANNA_FILE_LOCATION);
   return *a_value.a_integer;
 }
 
 S64 Variable::getInteger64Value() const
-throw(RuntimeException) {
+noexcept(false) {
   int result(0);
   verifyIsNotNull(ANNA_FILE_LOCATION);
   verifyMatchSomeType(Type::Integer, Type::Integer64, ANNA_FILE_LOCATION);
@@ -152,21 +152,21 @@ throw(RuntimeException) {
 }
 
 bool Variable::getBooleanValue() const
-throw(RuntimeException) {
+noexcept(false) {
   verifyIsNotNull(ANNA_FILE_LOCATION);
   verifyMatchType(Type::Boolean, ANNA_FILE_LOCATION);
   return *a_value.a_boolean;
 }
 
 const DataBlock& Variable::getDataBlockValue() const
-throw(RuntimeException) {
+noexcept(false) {
   verifyIsNotNull(ANNA_FILE_LOCATION);
   verifyMatchType(Type::Block, ANNA_FILE_LOCATION);
   return *a_value.a_dataBlock;
 }
 
 float Variable::getFloatValue() const
-throw(RuntimeException) {
+noexcept(false) {
   float result(0.0);
   verifyIsNotNull(ANNA_FILE_LOCATION);
   verifyMatchSomeType(Type::Float, Type::Double, ANNA_FILE_LOCATION);
@@ -181,7 +181,7 @@ throw(RuntimeException) {
 }
 
 double Variable::getDoubleValue() const
-throw(RuntimeException) {
+noexcept(false) {
   double result(0.0);
   verifyIsNotNull(ANNA_FILE_LOCATION);
   verifyMatchSomeType(Type::Float, Type::Double, ANNA_FILE_LOCATION);
@@ -196,7 +196,7 @@ throw(RuntimeException) {
 }
 
 String Variable::asString() const
-throw() {
+{
   String result("anna::Variable { Name: ");
   result << a_name;
   result << " | Type: " << Type::asNotNullCString(a_type);
@@ -222,7 +222,7 @@ throw() {
 }
 
 void* Variable::buffer() const
-throw() {
+{
   void* result(NULL);
 
   switch(a_type) {
@@ -241,7 +241,7 @@ throw() {
 }
 
 void* Variable::getReference() const
-throw() {
+{
   void* result(NULL);
 
   switch(a_type) {
@@ -260,7 +260,7 @@ throw() {
 }
 
 void Variable::verifyMatchType(const Type::_v type, const char* file, const int lineno) const
-throw(RuntimeException) {
+noexcept(false) {
   if(a_type != type) {
     String msg("Variable: ");
     msg << a_name << " | " << Type::asNotNullCString(type) << " mismatch data type";
@@ -269,7 +269,7 @@ throw(RuntimeException) {
 }
 
 void Variable::verifyMatchSomeType(const Type::_v firstType, const Type::_v secondType, const char* file, const int lineno) const
-throw(RuntimeException) {
+noexcept(false) {
   if(a_type != firstType && a_type != secondType) {
     String msg("Variable: ");
     msg << a_name << " | Neihter " << Type::asNotNullCString(firstType);
@@ -279,7 +279,7 @@ throw(RuntimeException) {
 }
 
 void Variable::verifyIsNotNull(const char* file, const int lineno) const
-throw(RuntimeException) {
+noexcept(false) {
   if(a_isNull == true) {
     String msg("Variable: ");
     msg << a_name << " | Variable does not have assigned value";