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
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) << ")");
}
}
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() << ")");
}
}
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 {