Browse Source

[3263] Add API doc note that RRset::addRdata() can throw

Mukund Sivaraman 11 years ago
parent
commit
32bd410bb0
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/lib/dns/rrset.h

+ 7 - 0
src/lib/dns/rrset.h

@@ -382,6 +382,13 @@ public:
     /// Still, this version would offer a more intuitive interface and is
     /// provided as such.
     ///
+    /// NOTE: Because a new Rdata object is constructed, this method can
+    /// throw a std::bad_cast exception if this RRset's class is NONE,
+    /// or if some other error occurs. If you want to be able to add
+    /// RDATA to an RRset whose class is NONE, please use the other
+    /// variant of \c addRdata() which accepts a \c ConstRdataPtr
+    /// argument.
+    ///
     /// \param rdata A reference to a \c rdata::RdataPtr (derived) class
     /// object, a copy of which is to be added to the \c RRset.
     virtual void addRdata(const rdata::Rdata& rdata) = 0;