BIND 10 trac2850_2, updated. 4a5506ec8f3474513c7de10969628385cec138b2 [2850] Change exception type thrown, and document it
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu May 2 08:22:46 UTC 2013
The branch, trac2850_2 has been updated
via 4a5506ec8f3474513c7de10969628385cec138b2 (commit)
from e646d8af58ff6b9863a89ae65b6244275405bce0 (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 4a5506ec8f3474513c7de10969628385cec138b2
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu May 2 13:52:10 2013 +0530
[2850] Change exception type thrown, and document it
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory/zone_writer.cc | 2 +-
src/lib/datasrc/memory/zone_writer.h | 2 ++
.../datasrc/tests/memory/zone_writer_unittest.cc | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/zone_writer.cc b/src/lib/datasrc/memory/zone_writer.cc
index c174b1b..abe2c6f 100644
--- a/src/lib/datasrc/memory/zone_writer.cc
+++ b/src/lib/datasrc/memory/zone_writer.cc
@@ -35,7 +35,7 @@ ZoneWriter::ZoneWriter(ZoneTableSegment* segment,
state_(ZW_UNUSED)
{
if (!segment->isWritable()) {
- isc_throw(isc::Unexpected,
+ isc_throw(isc::InvalidOperation,
"Attempt to construct ZoneWriter for a read-only segment");
}
}
diff --git a/src/lib/datasrc/memory/zone_writer.h b/src/lib/datasrc/memory/zone_writer.h
index c77dea2..c0369d3 100644
--- a/src/lib/datasrc/memory/zone_writer.h
+++ b/src/lib/datasrc/memory/zone_writer.h
@@ -42,6 +42,8 @@ class ZoneWriter {
public:
/// \brief Constructor
///
+ /// \throw isc::InvalidOperation if \c segment is read-only.
+ ///
/// \param segment The zone table segment to store the zone into.
/// \param load_action The callback used to load data.
/// \param install_action The callback used to install the loaded zone.
diff --git a/src/lib/datasrc/tests/memory/zone_writer_unittest.cc b/src/lib/datasrc/tests/memory/zone_writer_unittest.cc
index 0c337ea..13a5537 100644
--- a/src/lib/datasrc/tests/memory/zone_writer_unittest.cc
+++ b/src/lib/datasrc/tests/memory/zone_writer_unittest.cc
@@ -109,7 +109,7 @@ TEST_F(ZoneWriterTest, constructForReadOnlySegment) {
EXPECT_THROW(ZoneWriter(&ztable_segment,
bind(&ZoneWriterTest::loadAction, this, _1),
Name("example.org"), RRClass::IN()),
- isc::Unexpected);
+ isc::InvalidOperation);
}
// We call it the way we are supposed to, check every callback is called in the
More information about the bind10-changes
mailing list