Commit 8c17bbef authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[5126] Changes after review

parent d21293c3
......@@ -204,6 +204,7 @@ protected:
}
}
public:
/// @brief Returns a value converted to uint32_t
///
/// Instantiation of getIntType() to uint32_t
......
......@@ -58,10 +58,6 @@ public:
class SimpleParserClassTest : public SimpleParser {
public:
/// Make getUint8 public
using SimpleParser::getUint8;
/// @brief Instantiation of getAndConvert
///
/// @param scope specified parameter will be extracted from this scope
......
......@@ -101,15 +101,13 @@ ClientClassDefParser::parse(ClientClassDictionaryPtr& class_dictionary,
if (next_server.getFamily() != AF_INET) {
isc_throw(DhcpConfigError, "Invalid next-server value: '"
<< next_server_txt
<< "', must be IPv4 address ("
<< next_server_txt << "', must be IPv4 address ("
<< getPosition("next-server", class_def_cfg) << ")");
}
if (next_server.isV4Bcast()) {
isc_throw(DhcpConfigError, "Invalid next-server value: '"
<< next_server_txt
<< "', must not be a broadcast ("
<< next_server_txt << "', must not be a broadcast ("
<< getPosition("next-server", class_def_cfg) << ")");
}
}
......@@ -146,7 +144,7 @@ ClientClassDefParser::parse(ClientClassDictionaryPtr& class_dictionary,
class_dictionary->addClass(name, match_expr, options, next_server,
sname, filename);
} catch (const std::exception& ex) {
isc_throw(DhcpConfigError, ex.what()
isc_throw(DhcpConfigError, "Can't add class: " << ex.what()
<< " (" << class_def_cfg->getPosition() << ")");
}
}
......
......@@ -26,6 +26,9 @@ namespace dhcp {
void
DUIDConfigParser::parse(const CfgDUIDPtr& cfg,
isc::data::ConstElementPtr duid_configuration) {
if (!cfg) {
isc_throw(DhcpConfigError, "Must provide valid pointer to cfg when parsing duid");
}
std::string param;
try {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment