]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2207] Exceptions & asserts
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Fri, 19 Oct 2012 17:10:39 +0000 (19:10 +0200)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Fri, 19 Oct 2012 17:10:39 +0000 (19:10 +0200)
Changed an exception for unexpected problem and removed a comment about
assert.

src/lib/datasrc/memory/zone_writer_local.cc

index a14cbff1c4ab43c2567883f23e56f2e6d394e1bb..0cd95876c5421e021ebb8e1d7340227fbac192b2 100644 (file)
@@ -38,7 +38,7 @@ ZoneWriterLocal::ZoneWriterLocal(ZoneTableSegmentLocal* segment,
 
 ZoneWriterLocal::~ZoneWriterLocal() {
     // Clean up everything there might be left if someone forgot, just
-    // in case. Or should we assert instead?
+    // in case.
     cleanup();
 }
 
@@ -67,7 +67,7 @@ ZoneWriterLocal::install() {
 
     ZoneTable* table(segment_->getHeader().getTable());
     if (table == NULL) {
-        isc_throw(isc::InvalidOperation, "No zone table present");
+        isc_throw(isc::Unexpected, "No zone table present");
     }
     const ZoneTable::AddResult result(table->addZone(
                                           segment_->getMemorySegment(),