Commit e91d83ea authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3035] Renamed DhcidComputeError to DhcidRdataComputeError.

parent b0131d52
......@@ -90,7 +90,7 @@ void
D2Dhcid::fromHWAddr(const isc::dhcp::HWAddrPtr& hwaddr,
const std::vector<uint8_t>& 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<const Botan::byte*>(&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());
}
......
......@@ -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) { };
};
......
......@@ -525,12 +525,12 @@ TEST_F(DhcidTest, fromClientId) {
// Make sure that the empty FQDN is not accepted.
std::vector<uint8_t> 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<uint8_t> 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
......
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