From: Marcin Siodelski Date: Tue, 3 Sep 2013 09:09:16 +0000 (+0200) Subject: [3035] Renamed DhcidComputeError to DhcidRdataComputeError. X-Git-Tag: bind10-1.2.0beta1-release~102^2~21^2~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e91d83ea552f8704e04f099a701a838e14947368;p=thirdparty%2Fkea.git [3035] Renamed DhcidComputeError to DhcidRdataComputeError. --- diff --git a/src/lib/dhcp_ddns/ncr_msg.cc b/src/lib/dhcp_ddns/ncr_msg.cc index 1c29d25b6d..bc88df2063 100644 --- a/src/lib/dhcp_ddns/ncr_msg.cc +++ b/src/lib/dhcp_ddns/ncr_msg.cc @@ -90,7 +90,7 @@ void D2Dhcid::fromHWAddr(const isc::dhcp::HWAddrPtr& hwaddr, const std::vector& wire_fqdn) { if (!hwaddr) { - isc_throw(isc::dhcp_ddns::DhcidComputeError, + isc_throw(isc::dhcp_ddns::DhcidRdataComputeError, "unable to compute DHCID from the HW address, " "NULL pointer has been specified"); } @@ -113,7 +113,7 @@ D2Dhcid::createDigest(const uint8_t identifier_type, // valid. It is caller's responsibility to make sure it is in // the valid format. Here we just make sure it is not empty. if (wire_fqdn.empty()) { - isc_throw(isc::dhcp_ddns::DhcidComputeError, + isc_throw(isc::dhcp_ddns::DhcidRdataComputeError, "empty FQDN used to create DHCID"); } @@ -122,7 +122,7 @@ D2Dhcid::createDigest(const uint8_t identifier_type, // But let's be on the safe side and at least check that it is not // empty. if (identifier_data.empty()) { - isc_throw(isc::dhcp_ddns::DhcidComputeError, + isc_throw(isc::dhcp_ddns::DhcidRdataComputeError, "empty DUID used to create DHCID"); } @@ -146,7 +146,7 @@ D2Dhcid::createDigest(const uint8_t identifier_type, secure = sha.process(static_cast(&data[0]), data.size()); } catch (const std::exception& ex) { - isc_throw(isc::dhcp_ddns::DhcidComputeError, + isc_throw(isc::dhcp_ddns::DhcidRdataComputeError, "error while generating DHCID from DUID: " << ex.what()); } diff --git a/src/lib/dhcp_ddns/ncr_msg.h b/src/lib/dhcp_ddns/ncr_msg.h index fb275f50e8..a35d212cbe 100644 --- a/src/lib/dhcp_ddns/ncr_msg.h +++ b/src/lib/dhcp_ddns/ncr_msg.h @@ -43,9 +43,9 @@ public: /// @brief Exception thrown when there is an error occured during computation /// of the DHCID. -class DhcidComputeError : public isc::Exception { +class DhcidRdataComputeError : public isc::Exception { public: - DhcidComputeError(const char* file, size_t line, const char* what) : + DhcidRdataComputeError(const char* file, size_t line, const char* what) : isc::Exception(file, line, what) { }; }; diff --git a/src/lib/dhcp_ddns/tests/ncr_unittests.cc b/src/lib/dhcp_ddns/tests/ncr_unittests.cc index d19d189074..19b4f06b99 100644 --- a/src/lib/dhcp_ddns/tests/ncr_unittests.cc +++ b/src/lib/dhcp_ddns/tests/ncr_unittests.cc @@ -525,12 +525,12 @@ TEST_F(DhcidTest, fromClientId) { // Make sure that the empty FQDN is not accepted. std::vector empty_wire_fqdn; EXPECT_THROW(dhcid.fromClientId(clientid, empty_wire_fqdn), - isc::dhcp_ddns::DhcidComputeError); + isc::dhcp_ddns::DhcidRdataComputeError); // Make sure that the empty client identifier is not accepted. clientid.clear(); EXPECT_THROW(dhcid.fromClientId(clientid, wire_fqdn_), - isc::dhcp_ddns::DhcidComputeError); + isc::dhcp_ddns::DhcidRdataComputeError); } @@ -558,12 +558,12 @@ TEST_F(DhcidTest, fromHWAddr) { // Make sure that the empty FQDN is not accepted. std::vector empty_wire_fqdn; EXPECT_THROW(dhcid.fromHWAddr(hwaddr, empty_wire_fqdn), - isc::dhcp_ddns::DhcidComputeError); + isc::dhcp_ddns::DhcidRdataComputeError); // Make sure that the NULL HW address is not accepted. hwaddr.reset(); EXPECT_THROW(dhcid.fromHWAddr(hwaddr, wire_fqdn_), - isc::dhcp_ddns::DhcidComputeError); + isc::dhcp_ddns::DhcidRdataComputeError); } } // end of anonymous namespace