From: Mukund Sivaraman Date: Thu, 27 Dec 2012 11:32:19 +0000 (+0530) Subject: [2565] Add rationale for why bool is returned instead of throwing an exception X-Git-Tag: bind10-1.0.0-rc-release~95^2~21^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=080d47deb3088adddd96434acfd1c82bd14779c9;p=thirdparty%2Fkea.git [2565] Add rationale for why bool is returned instead of throwing an exception --- diff --git a/src/lib/dns/rrparamregistry.h b/src/lib/dns/rrparamregistry.h index 08d06503de..dfa4463055 100644 --- a/src/lib/dns/rrparamregistry.h +++ b/src/lib/dns/rrparamregistry.h @@ -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.