// an SOA RR. This condition should be avoided, and hence load()
// should throw when an empty zone is loaded.
if (RdataSet::find(set, RRType::SOA()) == NULL) {
- isc_throw(ZoneDataUpdater::EmptyZone,
+ isc_throw(EmptyZone,
"Won't create an empty zone for: " << zone_name);
}
/// \return The number of zones stored in the client.
virtual unsigned int getZoneCount() const;
+ /// \brief Zone is empty exception.
+ ///
+ /// This is thrown if we have an empty zone created as a result of
+ /// load().
+ struct EmptyZone : public InvalidParameter {
+ EmptyZone(const char* file, size_t line, const char* what) :
+ InvalidParameter(file, line, what)
+ {}
+ };
+
/// \brief Load zone from masterfile.
///
/// This loads data from masterfile specified by filename. It replaces
{}
};
- /// \brief Zone is empty exception.
- ///
- /// This is thrown if we have an empty zone created as a result of
- /// load().
- struct EmptyZone : public InvalidParameter {
- EmptyZone(const char* file, size_t line, const char* what) :
- InvalidParameter(file, line, what)
- {}
- };
-
/// \brief General failure exception for \c add().
///
/// This is thrown against general error cases in adding an RRset
EXPECT_THROW(client_->load(Name("."),
TEST_DATA_DIR "/empty.zone"),
- ZoneDataUpdater::EmptyZone);
+ InMemoryClient::EmptyZone);
EXPECT_EQ(0, client_->getZoneCount());