BIND 10 trac525, updated. 7bacbe123f6eeeed4ee0f6df42739dc337278d2d [525] Update data sources for the new InvalidOperation exception thrown by addRdata()
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Jan 14 15:04:09 UTC 2014
The branch, trac525 has been updated
via 7bacbe123f6eeeed4ee0f6df42739dc337278d2d (commit)
from 680a26df1add396d73206923a2144138573ae4bb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7bacbe123f6eeeed4ee0f6df42739dc337278d2d
Author: Mukund Sivaraman <muks at isc.org>
Date: Tue Jan 14 20:03:19 2014 +0530
[525] Update data sources for the new InvalidOperation exception thrown by addRdata()
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/database.cc | 4 ++++
.../datasrc/tests/memory/memory_client_unittest.cc | 2 +-
src/lib/dns/master_loader.cc | 3 +++
3 files changed, 8 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/database.cc b/src/lib/datasrc/database.cc
index 9c85054..ba9d68a 100644
--- a/src/lib/datasrc/database.cc
+++ b/src/lib/datasrc/database.cc
@@ -196,6 +196,10 @@ void addOrCreate(isc::dns::RRsetPtr& rrset,
isc_throw(DataSourceError,
"bad rdata in database for " << name << " "
<< type << ": " << ivrt.what());
+ } catch (const isc::InvalidOperation& ivo) {
+ isc_throw(DataSourceError,
+ "bad rdata in database for " << name << " "
+ << type << ": " << ivo.what());
}
}
diff --git a/src/lib/datasrc/tests/memory/memory_client_unittest.cc b/src/lib/datasrc/tests/memory/memory_client_unittest.cc
index 73862e3..d91bbb3 100644
--- a/src/lib/datasrc/tests/memory/memory_client_unittest.cc
+++ b/src/lib/datasrc/tests/memory/memory_client_unittest.cc
@@ -479,7 +479,7 @@ TEST_F(MemoryClientTest, loadMultipleCNAMEThrows) {
zclass_,
TEST_DATA_DIR
"/example.org-multiple-cname.zone"),
- ZoneDataUpdater::AddError);
+ isc::datasrc::ZoneLoaderException);
// Teardown checks for memory segment leaks
}
diff --git a/src/lib/dns/master_loader.cc b/src/lib/dns/master_loader.cc
index 6b6e091..41f8214 100644
--- a/src/lib/dns/master_loader.cc
+++ b/src/lib/dns/master_loader.cc
@@ -581,6 +581,9 @@ MasterLoader::MasterLoaderImpl::loadIncremental(size_t count_limit) {
// below case. Once we restrict the below to some smaller
// exception, we should remove this.
throw;
+ } catch (const InvalidOperation& ex) {
+ // The AddCallback can throw an InvalidOperation.
+ isc_throw(MasterLoaderError, "Invalid RR data: " << ex.what());
} catch (const isc::Exception& e) {
// TODO: Once we do #2518, catch only the DNSTextError here,
// not isc::Exception. The rest should be just simply
More information about the bind10-changes
mailing list