|
@@ -640,7 +640,8 @@ namespace dhcp {
|
|
|
/// @return parser for specified global DHCPv6 parameter
|
|
|
/// @throw NotImplemented if trying to create a parser for unknown config
|
|
|
/// element
|
|
|
-DhcpConfigParser* createGlobal6DhcpConfigParser(const std::string& config_id) {
|
|
|
+ DhcpConfigParser* createGlobal6DhcpConfigParser(const std::string& config_id,
|
|
|
+ ConstElementPtr element) {
|
|
|
DhcpConfigParser* parser = NULL;
|
|
|
if ((config_id.compare("preferred-lifetime") == 0) ||
|
|
|
(config_id.compare("valid-lifetime") == 0) ||
|
|
@@ -669,9 +670,9 @@ DhcpConfigParser* createGlobal6DhcpConfigParser(const std::string& config_id) {
|
|
|
} else if (config_id.compare("dhcp-ddns") == 0) {
|
|
|
parser = new D2ClientConfigParser(config_id);
|
|
|
} else {
|
|
|
- isc_throw(NotImplemented,
|
|
|
- "Parser error: Global configuration parameter not supported: "
|
|
|
- << config_id);
|
|
|
+ isc_throw(DhcpConfigError,
|
|
|
+ "unsupported global configuration parameter: "
|
|
|
+ << config_id << " (" << element->getPosition() << ")");
|
|
|
}
|
|
|
|
|
|
return (parser);
|
|
@@ -736,7 +737,8 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {
|
|
|
const std::map<std::string, ConstElementPtr>& values_map =
|
|
|
config_set->mapValue();
|
|
|
BOOST_FOREACH(config_pair, values_map) {
|
|
|
- ParserPtr parser(createGlobal6DhcpConfigParser(config_pair.first));
|
|
|
+ ParserPtr parser(createGlobal6DhcpConfigParser(config_pair.first,
|
|
|
+ config_pair.second));
|
|
|
LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, DHCP6_PARSER_CREATED)
|
|
|
.arg(config_pair.first);
|
|
|
if (config_pair.first == "subnet6") {
|