aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Conf.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp
index 1962517..e3c894a 100644
--- a/src/Conf.cpp
+++ b/src/Conf.cpp
@@ -1067,6 +1067,24 @@ namespace sibs
else
throw ParserException("Expected " + string(currentObject.data, currentObject.size) + ".ignore_dirs to be a list, was a single value");
}
+ else if(name.equals("error_on_warning"))
+ {
+ if (value.isSingle())
+ {
+ StringView value_str = value.asSingle();
+ bool value_bool = false;
+ if(value_str.equals("true"))
+ value_bool = true;
+ else if(value_str.equals("false"))
+ value_bool = false;
+ else
+ throw ParserException("Expected " + string(currentObject.data, currentObject.size) + ".error_on_warning to be either true or false");
+
+ errorOnWarning = value_bool;
+ }
+ else
+ throw ParserException("Expected " + string(currentObject.data, currentObject.size) + ".error_on_warning to be a single value, was a list");
+ }
else
failInvalidFieldUnderObject(name);
}