]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2565] Add rationale for why bool is returned instead of throwing an exception
authorMukund Sivaraman <muks@isc.org>
Thu, 27 Dec 2012 11:32:19 +0000 (17:02 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 27 Dec 2012 11:40:29 +0000 (17:10 +0530)
src/lib/dns/rrparamregistry.h

index 08d06503ded13a730c43fe1c7e4d0eb7dcffdfe8..dfa4463055ebf518445e5be198dac2022aff4486 100644 (file)
@@ -392,6 +392,10 @@ public:
     /// corresponding number as the type code in \c type_code;
     /// otherwise, it returns false and \c type_code is untouched.
     ///
+    /// We return \c false and avoid simply throwing an exception in the
+    /// case of an error so that the code is performant in some
+    /// situations.
+    ///
     /// \param type_string The textual representation of the RR type.
     /// \param type_code Returns the RR type code in this argument.
     /// \return true if conversion is successful, false otherwise.
@@ -427,6 +431,10 @@ public:
     /// \c class_code; otherwise, it returns false and \c class_code is
     /// untouched.
     ///
+    /// We return \c false and avoid simply throwing an exception in the
+    /// case of an error so that the code is performant in some
+    /// situations.
+    ///
     /// \param class_string The textual representation of the RR class.
     /// \param class_code Returns the RR class code in this argument.
     /// \return true if conversion is successful, false otherwise.