]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1535] improve OutOfZoneFind text and docstring
authorJelte Jansen <jelte@isc.org>
Thu, 29 Mar 2012 13:20:50 +0000 (15:20 +0200)
committerJelte Jansen <jelte@isc.org>
Thu, 29 Mar 2012 13:20:50 +0000 (15:20 +0200)
src/lib/datasrc/database.cc
src/lib/datasrc/memory_datasrc.cc
src/lib/python/isc/datasrc/finder_inc.cc

index 6a364bdd399671bd7b1c4a37ca91805225424c80..85958f38305be623662fbc86fe7329a4722d9bb4 100644 (file)
@@ -865,8 +865,8 @@ DatabaseClient::Finder::findInternal(const Name& name, const RRType& type,
         name.compare(getOrigin()).getRelation();
     if (reln != NameComparisonResult::SUBDOMAIN &&
         reln != NameComparisonResult::EQUAL) {
-        isc_throw(OutOfZoneFind, "out-of-zone find(): " << name.toText() <<
-                                 " not in " << getOrigin().toText());
+        isc_throw(OutOfZoneFind, name.toText() << " not in " <<
+                                 getOrigin().toText());
     }
 
     // First, go through all superdomains from the origin down, searching for
index 70986b4d742d27efe0417ce8dff9a057c8e7eb18..17c22df6cfa77565cc0af5f8930fbe30db52fae8 100644 (file)
@@ -1206,8 +1206,7 @@ struct InMemoryZoneFinder::InMemoryZoneFinderImpl {
             name.compare(origin_).getRelation();
         if (reln != NameComparisonResult::SUBDOMAIN &&
             reln != NameComparisonResult::EQUAL) {
-            isc_throw(OutOfZoneFind, "out-of-zone find(): " <<
-                                     name.toText() <<
+            isc_throw(OutOfZoneFind, name.toText() <<
                                      " not in " << origin_.toText());
         }
 
index c063c44d6151d7450199eac49daaa8b48b865542..7caa144fa645a3fe9839d1840cbfd0301e89d568 100644 (file)
@@ -99,10 +99,9 @@ Their semantics is as follows (they are or bit-field):\n\
   of the non existence of any matching wildcard or non existence of an\n\
   exact match when a wildcard match is found.\n\
 \n\
-In general, name is expected to be included in the zone, that is, it\n\
-should be equal to or a subdomain of the zone origin. Otherwise this\n\
-method will return NXDOMAIN with an empty RRset. But such a case\n\
-should rather be considered a caller's bug.\n\
+Name is expected to be included in the zone, that is, it\n\
+should be equal to or a subdomain of the zone origin. Otherwise an\n\
+OutOfZoneFind exception is raised.\n\
 \n\
 Note: For this reason it's probably better to throw an exception than\n\
 returning NXDOMAIN. This point should be revisited in a near future\n\