Browse Source

s/dns_throw/isc_throw/
now that the generic exception code is a separate library in the isc namespace
it doesn't make sense to call it dns_something.
I know it's a big change, but I believe we should do this cleanup sooner
than later.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1181 e5f2f494-b856-4b98-b285-d166d9295462

JINMEI Tatuya 15 years ago
parent
commit
9857db0468

+ 2 - 2
src/lib/auth/data_source.cc

@@ -587,7 +587,7 @@ DataSrc::doQuery(Query& q)
                 continue;
 
             default:
-                dns_throw (Unexpected, "unexpected query state");
+                isc_throw (Unexpected, "unexpected query state");
             }
         } else if (result == ERROR || result == NOT_IMPLEMENTED) {
             m.setRcode(Rcode::SERVFAIL());
@@ -773,7 +773,7 @@ void
 MetaDataSrc::addDataSrc(ConstDataSrcPtr data_src)
 {
     if (getClass() != RRClass::ANY() && data_src->getClass() != getClass()) {
-        dns_throw(Unexpected, "class mismatch");
+        isc_throw(Unexpected, "class mismatch");
     }
 
     data_sources.push_back(data_src);

+ 4 - 4
src/lib/auth/query.cc

@@ -60,7 +60,7 @@ QueryTask::QueryTask(const isc::dns::Name& n, const isc::dns::RRClass& c,
     state(GETANSWER), flags(0)
 {
     if (op != SIMPLE_QUERY) {
-        dns_throw(Unexpected, "invalid constructor for this task operation");
+        isc_throw(Unexpected, "invalid constructor for this task operation");
     }
 }
 
@@ -71,7 +71,7 @@ QueryTask::QueryTask(const isc::dns::Name& n, const isc::dns::RRClass& c,
     op(o), state(GETANSWER), flags(0)
 {
     if (op != REF_QUERY) {
-        dns_throw(Unexpected, "invalid constructor for this task operation");
+        isc_throw(Unexpected, "invalid constructor for this task operation");
     }
 }
 
@@ -82,7 +82,7 @@ QueryTask::QueryTask(const isc::dns::Name& n, const isc::dns::RRClass& c,
         state(st), flags(0)
 {
     if (op != GLUE_QUERY && op != NOGLUE_QUERY) {
-        dns_throw(Unexpected, "invalid constructor for this task operation");
+        isc_throw(Unexpected, "invalid constructor for this task operation");
     }
 }
 
@@ -94,7 +94,7 @@ Query::Query(Message& m, bool dnssec) :
 {
     // Check message formatting
     if (message_->getRRCount(Section::QUESTION()) != 1) {
-        dns_throw(Unexpected, "malformed message: too many questions");
+        isc_throw(Unexpected, "malformed message: too many questions");
     }
 
     // Populate the query task queue with the initial question

+ 2 - 2
src/lib/cc/data.cc

@@ -1009,7 +1009,7 @@ isc::data::removeIdentical(ElementPtr a, const ElementPtr b)
         return;
     }
     if (a->getType() != Element::map || b->getType() != Element::map) {
-        dns_throw(TypeError, "Non-map Elements passed to removeIdentical");
+        isc_throw(TypeError, "Non-map Elements passed to removeIdentical");
     }
 
     std::map<std::string, ElementPtr> m = a->mapValue();
@@ -1028,7 +1028,7 @@ isc::data::merge(ElementPtr element, const ElementPtr other)
 {
     if (element->getType() != Element::map ||
         other->getType() != Element::map) {
-        dns_throw(TypeError, "merge arguments not MapElements");
+        isc_throw(TypeError, "merge arguments not MapElements");
     }
     
     std::map<std::string, ElementPtr> m = other->mapValue();

+ 16 - 16
src/lib/cc/data.h

@@ -138,12 +138,12 @@ public:
     /// If you want an exception-safe getter method, use
     /// getValue() below
     //@{
-    virtual int intValue() { dns_throw(TypeError, "intValue() called on non-integer Element"); };
-    virtual double doubleValue() { dns_throw(TypeError, "doubleValue() called on non-double Element"); };
-    virtual bool boolValue() { dns_throw(TypeError, "boolValue() called on non-Bool Element"); };
-    virtual std::string stringValue() { dns_throw(TypeError, "stringValue() called on non-string Element"); };
-    virtual const std::vector<boost::shared_ptr<Element> >& listValue() { dns_throw(TypeError, "listValue() called on non-list Element"); }; // replace with real exception or empty vector?
-    virtual const std::map<std::string, boost::shared_ptr<Element> >& mapValue() { dns_throw(TypeError, "mapValue() called on non-map Element"); }; // replace with real exception or empty map?
+    virtual int intValue() { isc_throw(TypeError, "intValue() called on non-integer Element"); };
+    virtual double doubleValue() { isc_throw(TypeError, "doubleValue() called on non-double Element"); };
+    virtual bool boolValue() { isc_throw(TypeError, "boolValue() called on non-Bool Element"); };
+    virtual std::string stringValue() { isc_throw(TypeError, "stringValue() called on non-string Element"); };
+    virtual const std::vector<boost::shared_ptr<Element> >& listValue() { isc_throw(TypeError, "listValue() called on non-list Element"); }; // replace with real exception or empty vector?
+    virtual const std::map<std::string, boost::shared_ptr<Element> >& mapValue() { isc_throw(TypeError, "mapValue() called on non-map Element"); }; // replace with real exception or empty map?
     //@}
 
     /// \name Exception-safe getters
@@ -190,21 +190,21 @@ public:
     /// Returns the ElementPtr at the given index. If the index is out
     /// of bounds, this function throws an std::out_of_range exception.
     /// \param i The position of the ElementPtr to return
-    virtual ElementPtr get(const int i) { dns_throw(TypeError, "get(int) called on a non-list Element"); };
+    virtual ElementPtr get(const int i) { isc_throw(TypeError, "get(int) called on a non-list Element"); };
     /// Sets the ElementPtr at the given index. If the index is out
     /// of bounds, this function throws an std::out_of_range exception.
     /// \param i The position of the ElementPtr to set
     /// \param element The ElementPtr to set at the position
-    virtual void set(const size_t i, ElementPtr element) { dns_throw(TypeError, "set(int, element) called on a non-list Element"); };
+    virtual void set(const size_t i, ElementPtr element) { isc_throw(TypeError, "set(int, element) called on a non-list Element"); };
     /// Adds an ElementPtr to the list
     /// \param element The ElementPtr to add
-    virtual void add(ElementPtr element) { dns_throw(TypeError, "add() called on a non-list Element"); };
+    virtual void add(ElementPtr element) { isc_throw(TypeError, "add() called on a non-list Element"); };
     /// Removes the element at the given position. If the index is out
     /// of nothing happens.
     /// \param i The index of the element to remove.
-    virtual void remove(const int i) { dns_throw(TypeError, "remove(int) called on a non-list Element"); };
+    virtual void remove(const int i) { isc_throw(TypeError, "remove(int) called on a non-list Element"); };
     /// Returns the number of elements in the list.
-    virtual size_t size() { dns_throw(TypeError, "size() called on a non-list Element"); };
+    virtual size_t size() { isc_throw(TypeError, "size() called on a non-list Element"); };
     //@}
     
     /// \name MapElement functions
@@ -215,17 +215,17 @@ public:
     /// Returns the ElementPtr at the given key
     /// \param name The key of the Element to return
     /// \return The ElementPtr at the given key
-    virtual ElementPtr get(const std::string& name) { dns_throw(TypeError, "get(string) called on a non-map Element"); } ;
+    virtual ElementPtr get(const std::string& name) { isc_throw(TypeError, "get(string) called on a non-map Element"); } ;
     /// Sets the ElementPtr at the given key
     /// \param name The key of the Element to set
-    virtual void set(const std::string& name, ElementPtr element) { dns_throw(TypeError, "set(name, element) called on a non-map Element"); };
+    virtual void set(const std::string& name, ElementPtr element) { isc_throw(TypeError, "set(name, element) called on a non-map Element"); };
     /// Remove the ElementPtr at the given key
     /// \param name The key of the Element to remove
-    virtual void remove(const std::string& name) { dns_throw(TypeError, "remove(string) called on a non-map Element"); };
+    virtual void remove(const std::string& name) { isc_throw(TypeError, "remove(string) called on a non-map Element"); };
     /// Checks if there is data at the given key
     /// \param name The key of the Element to remove
     /// \return true if there is data at the key, false if not.
-    virtual bool contains(const std::string& name) { dns_throw(TypeError, "contains(string) called on a non-map Element"); }
+    virtual bool contains(const std::string& name) { isc_throw(TypeError, "contains(string) called on a non-map Element"); }
     /// Recursively finds any data at the given identifier. The
     /// identifier is a /-separated list of names of nested maps, with
     /// the last name being the leaf that is returned.
@@ -239,7 +239,7 @@ public:
     /// \return The ElementPtr at the given identifier. Returns a
     /// null ElementPtr if it is not found, which can be checked with
     /// Element::is_null(ElementPtr e).
-    virtual ElementPtr find(const std::string& identifier) { dns_throw(TypeError, "find(string) called on a non-map Element"); };
+    virtual ElementPtr find(const std::string& identifier) { isc_throw(TypeError, "find(string) called on a non-map Element"); };
     /// See \c Element::find()
     /// \param identifier The identifier of the element to find
     /// \param t Reference to store the resulting ElementPtr, if found.

+ 3 - 3
src/lib/config/ccsession.cc

@@ -86,13 +86,13 @@ parseAnswer(int &rcode, const ElementPtr msg)
 {
     if (!msg->contains("result")) {
         // TODO: raise CCSessionError exception
-        dns_throw(CCSessionError, "No result in answer message");
+        isc_throw(CCSessionError, "No result in answer message");
     } else {
         ElementPtr result = msg->get("result");
         if (result->get(0)->getType() != Element::integer) {
-            dns_throw(CCSessionError, "First element of result is not an rcode in answer message");
+            isc_throw(CCSessionError, "First element of result is not an rcode in answer message");
         } else if (result->get(0)->intValue() != 0 && result->get(1)->getType() != Element::string) {
-            dns_throw(CCSessionError, "Rcode in answer message is non-zero, but other argument is not a StringElement");
+            isc_throw(CCSessionError, "Rcode in answer message is non-zero, but other argument is not a StringElement");
         }
         rcode = result->get(0)->intValue();
         if (result->size() > 1) {

+ 6 - 6
src/lib/config/config_data.cc

@@ -31,12 +31,12 @@ find_spec_part(ElementPtr spec, const std::string& identifier)
 {
     //std::cout << "[XX] find_spec_part for " << identifier << std::endl;
     if (!spec) {
-        dns_throw(DataNotFoundError, "Empty specification");
+        isc_throw(DataNotFoundError, "Empty specification");
     }
     //std::cout << "in: " << std::endl << spec << std::endl;
     ElementPtr spec_part = spec;
     if (identifier == "") {
-        dns_throw(DataNotFoundError, "Empty identifier");
+        isc_throw(DataNotFoundError, "Empty identifier");
     }
     std::string id = identifier;
     size_t sep = id.find('/');
@@ -54,7 +54,7 @@ find_spec_part(ElementPtr spec, const std::string& identifier)
                 }
             }
             if (!found) {
-                dns_throw(DataNotFoundError, identifier);
+                isc_throw(DataNotFoundError, identifier);
             }
         }
         id = id.substr(sep + 1);
@@ -72,7 +72,7 @@ find_spec_part(ElementPtr spec, const std::string& identifier)
                 }
             }
             if (!found) {
-                dns_throw(DataNotFoundError, identifier);
+                isc_throw(DataNotFoundError, identifier);
             }
         } else if (spec_part->getType() == Element::map) {
             if (spec_part->contains("map_item_spec")) {
@@ -86,10 +86,10 @@ find_spec_part(ElementPtr spec, const std::string& identifier)
                     }
                 }
                 if (!found) {
-                    dns_throw(DataNotFoundError, identifier);
+                    isc_throw(DataNotFoundError, identifier);
                 }
             } else {
-                dns_throw(DataNotFoundError, identifier);
+                isc_throw(DataNotFoundError, identifier);
             }
         }
     }

+ 4 - 4
src/lib/dns/base32.cc

@@ -129,7 +129,7 @@ decodeBase32(const string& base32, vector<uint8_t>& result)
 
     // base32 text should be a multiple of 8 bytes long
     if (comp.str().length() % 8 != 0) {
-        dns_throw (BadBase32String, "Invalid length");
+        isc_throw (BadBase32String, "Invalid length");
     }
 
     istringstream iss(comp.str());
@@ -140,7 +140,7 @@ decodeBase32(const string& base32, vector<uint8_t>& result)
 
         iss >> setw(8) >> group;
         if (iss.bad() || iss.fail()) {
-            dns_throw (BadBase32String, "Could not parse base32 input");
+            isc_throw (BadBase32String, "Could not parse base32 input");
         }
 
         uint8_t octet = 0;
@@ -149,7 +149,7 @@ decodeBase32(const string& base32, vector<uint8_t>& result)
             int value;
 
             if (c != '=' && seenpad) {
-                dns_throw (BadBase32String, "Invalid base32 input");
+                isc_throw (BadBase32String, "Invalid base32 input");
             } else 
 
             if (c == '=' && !seenpad) {
@@ -158,7 +158,7 @@ decodeBase32(const string& base32, vector<uint8_t>& result)
             } else {
                 const char* pos = strchr(base32hex, c);
                 if (!pos) {
-                    dns_throw (BadBase32String, "Invalid base32 input");
+                    isc_throw (BadBase32String, "Invalid base32 input");
                 }
                 value = pos - base32hex;
                 assert (value < 32);

+ 3 - 3
src/lib/dns/base64.cc

@@ -150,7 +150,7 @@ decodeBase64(const string& base64, vector<uint8_t>& result)
         char ch = *srit;
         if (ch == BASE64_PADDING_CHAR) {
             if (++padlen > BASE64_MAX_PADDING_CHARS) {
-                dns_throw(BadBase64String,
+                isc_throw(BadBase64String,
                           "Too many Base64 padding characters");
             }
         } else if (!isspace(ch)) {
@@ -167,7 +167,7 @@ decodeBase64(const string& base64, vector<uint8_t>& result)
                                                       base64.end(),
                                                       base64.end())));
     } catch (dataflow_exception& ex) {
-        dns_throw(BadBase64String, ex.what());
+        isc_throw(BadBase64String, ex.what());
     }
 
     // Confirm the original base64 text is the canonical encoding of the
@@ -176,7 +176,7 @@ decodeBase64(const string& base64, vector<uint8_t>& result)
     vector<uint8_t>::const_reverse_iterator rit = result.rbegin();
     for (int i = 0; i < padlen; ++i, ++rit) {
         if (*rit != 0) {
-            dns_throw(BadBase64String, "Non 0 bits included in padding");
+            isc_throw(BadBase64String, "Non 0 bits included in padding");
         }
     }
 

+ 7 - 7
src/lib/dns/buffer.h

@@ -123,7 +123,7 @@ public:
     void setPosition(size_t position)
     {
         if (position > len_)
-            dns_throw(InvalidBufferPosition, "position is too large");
+            isc_throw(InvalidBufferPosition, "position is too large");
         position_ = position;
     }
     //@}
@@ -138,7 +138,7 @@ public:
     uint8_t readUint8()
     {
         if (position_ + sizeof(uint8_t) > len_) {
-            dns_throw(InvalidBufferPosition, "read beyond end of buffer");
+            isc_throw(InvalidBufferPosition, "read beyond end of buffer");
         }
 
         return (data_[position_++]);
@@ -154,7 +154,7 @@ public:
         const uint8_t* cp;
 
         if (position_ + sizeof(data) > len_) {
-            dns_throw(InvalidBufferPosition, "read beyond end of buffer");
+            isc_throw(InvalidBufferPosition, "read beyond end of buffer");
         }
 
         cp = &data_[position_];
@@ -175,7 +175,7 @@ public:
         const uint8_t* cp;
 
         if (position_ + sizeof(data) > len_) {
-            dns_throw(InvalidBufferPosition, "read beyond end of buffer");
+            isc_throw(InvalidBufferPosition, "read beyond end of buffer");
         }
 
         cp = &data_[position_];
@@ -197,7 +197,7 @@ public:
     void readData(void* data, size_t len)
     {
         if (position_ + len > len_) {
-            dns_throw(InvalidBufferPosition, "read beyond end of buffer");
+            isc_throw(InvalidBufferPosition, "read beyond end of buffer");
         }
 
         memcpy(data, &data_[position_], len);
@@ -309,7 +309,7 @@ public:
     uint8_t operator[](size_t pos) const
     {
         if (pos >= data_.size()) {
-            dns_throw(InvalidBufferPosition, "read at invalid position");
+            isc_throw(InvalidBufferPosition, "read at invalid position");
         }
         return (data_[pos]);
     }
@@ -359,7 +359,7 @@ public:
     void writeUint16At(uint16_t data, size_t pos)
     {
         if (pos + sizeof(data) > data_.size()) {
-            dns_throw(InvalidBufferPosition, "write at invalid position");
+            isc_throw(InvalidBufferPosition, "write at invalid position");
         }
 
         data_[pos] = static_cast<uint8_t>((data & 0xff00U) >> 8);

+ 2 - 2
src/lib/dns/dnstime.cc

@@ -67,7 +67,7 @@ checkRange(int min, int max, int value, const string& valname) {
     }
     ostringstream oss;
     oss << "Invalid " << valname << " value: " << value;
-    dns_throw(InvalidTime, oss.str().c_str());
+    isc_throw(InvalidTime, oss.str().c_str());
 }
 
 static int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
@@ -90,7 +90,7 @@ DNSSECTimeFromText(const string& time_txt)
     {
         ostringstream oss;
         oss << "Couldn't convert time value: " << time_txt;
-        dns_throw(InvalidTime, oss.str().c_str());
+        isc_throw(InvalidTime, oss.str().c_str());
     }
 
     checkRange(1970, 9999, year, "year");

+ 2 - 2
src/lib/dns/hex.cc

@@ -65,7 +65,7 @@ decodeHex(const std::string& hex, std::vector<uint8_t>& result)
         iss >> c2;
         const char* pos = strchr(hexdigits, toupper(c2));
         if (!pos) {
-            dns_throw (BadHexString, "Invalid hex digit");
+            isc_throw (BadHexString, "Invalid hex digit");
         }
 
         n = pos - hexdigits;
@@ -77,7 +77,7 @@ decodeHex(const std::string& hex, std::vector<uint8_t>& result)
         const char* pos1 = strchr(hexdigits, toupper(c1));
         const char* pos2 = strchr(hexdigits, toupper(c2));
         if (!pos1 || !pos2) {
-            dns_throw (BadHexString, "Invalid hex digit");
+            isc_throw (BadHexString, "Invalid hex digit");
         }
 
         n = (pos1 - hexdigits) << 4;

+ 14 - 14
src/lib/dns/message.cc

@@ -162,7 +162,7 @@ Opcode::toText() const
 Rcode::Rcode(uint16_t code) : code_(code)
 {
     if (code_ > MAX_RCODE) {
-        dns_throw(OutOfRange, "Rcode is too large to construct");
+        isc_throw(OutOfRange, "Rcode is too large to construct");
     }
 }
 
@@ -287,7 +287,7 @@ void
 Message::setDNSSECSupported(bool on)
 {
     if (impl_->mode_ != Message::RENDER) {
-        dns_throw(InvalidMessageOperation,
+        isc_throw(InvalidMessageOperation,
                   "setDNSSECSupported performed in non-render mode");
     }
     impl_->dnssec_ok_ = on;
@@ -303,11 +303,11 @@ void
 Message::setUDPSize(uint16_t size)
 {
     if (impl_->mode_ != Message::RENDER) {
-        dns_throw(InvalidMessageOperation,
+        isc_throw(InvalidMessageOperation,
                   "setUDPSize performed in non-render mode");
     }
     if (size < DEFAULT_MAX_UDPSIZE) {
-        dns_throw(InvalidMessageUDPSize,
+        isc_throw(InvalidMessageUDPSize,
                   "Specified UDP message size is too small");
     }
     impl_->udpsize_ = size;
@@ -496,7 +496,7 @@ void
 Message::fromWire(InputBuffer& buffer)
 {
     if ((buffer.getLength() - buffer.getPosition()) < HEADERLEN) {
-        dns_throw(MessageTooShort, "");
+        isc_throw(MessageTooShort, "");
     }
 
     impl_->qid_ = buffer.readUint16();
@@ -531,7 +531,7 @@ MessageImpl::parseQuestion(Message& message, InputBuffer& buffer)
 
         if ((buffer.getLength() - buffer.getPosition()) <
             2 * sizeof(uint16_t)) {
-            dns_throw(MessageTooShort, "");
+            isc_throw(MessageTooShort, "");
         }
         RRType rrtype(buffer.readUint16());
         RRClass rrclass(buffer.readUint16());
@@ -575,7 +575,7 @@ MessageImpl::parseSection(Message& message, const Section& section,
         // buffer must store at least RR TYPE, RR CLASS, TTL, and RDLEN.
         if ((buffer.getLength() - buffer.getPosition()) <
             3 * sizeof(uint16_t) + sizeof(uint32_t)) {
-            dns_throw(MessageTooShort, "");
+            isc_throw(MessageTooShort, "");
         }
 
         RRType rrtype(buffer.readUint16());
@@ -589,11 +589,11 @@ MessageImpl::parseSection(Message& message, const Section& section,
         // implementation.  We'll revisit this part later.
         if (rrtype == RRType::OPT()) {
             if (section != Section::ADDITIONAL()) {
-                dns_throw(DNSMessageFORMERR,
+                isc_throw(DNSMessageFORMERR,
                           "EDNS OPT RR found in an invalid section");
             }
             if (remote_edns_ != NULL) {
-                dns_throw(DNSMessageFORMERR, "multiple EDNS OPT RR found");
+                isc_throw(DNSMessageFORMERR, "multiple EDNS OPT RR found");
             }
             if (((ttl.getValue() & EDNSVERSION_MASK) >> 16) >
                 Message::EDNS_SUPPORTED_VERSION) {
@@ -603,10 +603,10 @@ MessageImpl::parseSection(Message& message, const Section& section,
                 // This is probably because why BIND 9 does the version check
                 // in the client code.
                 // This is a TODO item.  Right now we simply reject it.
-                dns_throw(DNSMessageBADVERS, "unsupported EDNS version");
+                isc_throw(DNSMessageBADVERS, "unsupported EDNS version");
             }
             if (name != Name::ROOT_NAME()) {
-                dns_throw(DNSMessageFORMERR,
+                isc_throw(DNSMessageFORMERR,
                           "invalid owner name for EDNS OPT RR");
             }
 
@@ -770,7 +770,7 @@ void
 Message::makeResponse()
 {
     if (impl_->mode_ != Message::PARSE) {
-        dns_throw(InvalidMessageOperation,
+        isc_throw(InvalidMessageOperation,
                   "makeResponse() is performed in non-parse mode");
     }
 
@@ -904,7 +904,7 @@ const SectionIterator<RRsetPtr>
 Message::beginSection(const Section& section) const
 {
     if (section == Section::QUESTION()) {
-        dns_throw(InvalidMessageSection, "");
+        isc_throw(InvalidMessageSection, "");
     }
 
     return (RRsetIterator(
@@ -916,7 +916,7 @@ const SectionIterator<RRsetPtr>
 Message::endSection(const Section& section) const
 {
     if (section == Section::QUESTION()) {
-        dns_throw(InvalidMessageSection, "");
+        isc_throw(InvalidMessageSection, "");
     }
 
     return (RRsetIterator(

+ 17 - 17
src/lib/dns/name.cc

@@ -161,7 +161,7 @@ Name::Name(const std::string &namestring, bool downcase)
             //
             if (c == '.') {
                 if (s != send) {
-                    dns_throw(EmptyLabel, "non terminating empty label");
+                    isc_throw(EmptyLabel, "non terminating empty label");
                 }
                 is_root = true;
             } else if (c == '@' && s == send) {
@@ -189,7 +189,7 @@ Name::Name(const std::string &namestring, bool downcase)
         case ft_ordinary:
             if (c == '.') {
                 if (count == 0) {
-                    dns_throw(EmptyLabel, "duplicate period");
+                    isc_throw(EmptyLabel, "duplicate period");
                 }
                 ndata.at(offsets.back()) = count;
                 offsets.push_back(ndata.size());
@@ -202,7 +202,7 @@ Name::Name(const std::string &namestring, bool downcase)
                 state = ft_escape;
             } else {
                 if (++count > MAX_LABELLEN) {
-                    dns_throw(TooLongLabel, "label is too long");
+                    isc_throw(TooLongLabel, "label is too long");
                 }
                 ndata.push_back(downcase ? maptolower[c] : c);
             }
@@ -211,14 +211,14 @@ Name::Name(const std::string &namestring, bool downcase)
             if (c == '[') {
                 // This looks like a bitstring label, which was deprecated.
                 // Intentionally drop it.
-                dns_throw(BadLabelType, "invalid label type");
+                isc_throw(BadLabelType, "invalid label type");
             }
             state = ft_escape;
             // FALLTHROUGH
         case ft_escape:
             if (!isdigit(c & 0xff)) {
                 if (++count > MAX_LABELLEN) {
-                    dns_throw(TooLongLabel, "label is too long");
+                    isc_throw(TooLongLabel, "label is too long");
                 }
                 ndata.push_back(downcase ? maptolower[c] : c);
                 state = ft_ordinary;
@@ -230,17 +230,17 @@ Name::Name(const std::string &namestring, bool downcase)
             // FALLTHROUGH
         case ft_escdecimal:
             if (!isdigit(c & 0xff)) {
-                dns_throw(BadEscape, "mixture of escaped digit and non-digit");
+                isc_throw(BadEscape, "mixture of escaped digit and non-digit");
             }
             value *= 10;
             value += digitvalue[c];
             digits++;
             if (digits == 3) {
                 if (value > 255) {
-                    dns_throw(BadEscape, "escaped decimal is too large");
+                    isc_throw(BadEscape, "escaped decimal is too large");
                 }
                 if (++count > MAX_LABELLEN) {
-                    dns_throw(TooLongLabel, "label is too long");
+                    isc_throw(TooLongLabel, "label is too long");
                 }
                 ndata.push_back(downcase ? maptolower[value] : value);
                 state = ft_ordinary;
@@ -254,11 +254,11 @@ Name::Name(const std::string &namestring, bool downcase)
 
     if (!done) {                // no trailing '.' was found.
         if (ndata.size() == Name::MAX_WIRE) {
-            dns_throw(TooLongName, "name is too long for termination");
+            isc_throw(TooLongName, "name is too long for termination");
         }
         assert(s == send);
         if (state != ft_ordinary && state != ft_at) {
-            dns_throw(IncompleteName, "incomplete textual name");
+            isc_throw(IncompleteName, "incomplete textual name");
         }
         if (state == ft_ordinary) {
             assert(count != 0);
@@ -332,7 +332,7 @@ Name::Name(InputBuffer& buffer, bool downcase)
             if (c <= MAX_LABELLEN) {
                 offsets.push_back(nused);
                 if (nused + c + 1 > Name::MAX_WIRE) {
-                    dns_throw(TooLongName, "wire name is too long");
+                    isc_throw(TooLongName, "wire name is too long");
                 }
                 nused += c + 1;
                 ndata_.push_back(c);
@@ -351,7 +351,7 @@ Name::Name(InputBuffer& buffer, bool downcase)
             } else {
                 // this case includes local compression pointer, which hasn't
                 // been standardized.
-                dns_throw(BadLabelType, "unknown label character");
+                isc_throw(BadLabelType, "unknown label character");
             }
             break;
         case fw_ordinary:
@@ -370,7 +370,7 @@ Name::Name(InputBuffer& buffer, bool downcase)
                 break;
             }
             if (new_current >= biggest_pointer) {
-                dns_throw(BadPointer, "bad compression pointer: out of range");
+                isc_throw(BadPointer, "bad compression pointer: out of range");
             }
             biggest_pointer = new_current;
             current = new_current;
@@ -384,7 +384,7 @@ Name::Name(InputBuffer& buffer, bool downcase)
     }
 
     if (!done) {
-        dns_throw(IncompleteName, "incomplete wire-format name");
+        isc_throw(IncompleteName, "incomplete wire-format name");
     }
 
     labelcount_ = offsets.size();
@@ -475,7 +475,7 @@ Name::toText(bool omit_final_dot) const
                 }
             }
         } else {
-            dns_throw(BadLabelType, "unknown label type in name data");
+            isc_throw(BadLabelType, "unknown label type in name data");
         }
     }
 
@@ -611,7 +611,7 @@ Name::concatenate(const Name& suffix) const
 
     unsigned int length = this->length_ + suffix.length_ - 1;
     if (length > Name::MAX_WIRE) {
-        dns_throw(TooLongName, "names are too long to concatenate");
+        isc_throw(TooLongName, "names are too long to concatenate");
     }
 
     Name retname;
@@ -675,7 +675,7 @@ Name
 Name::split(unsigned int first, unsigned int n) const
 {
     if (n == 0 || first + n > labelcount_) {
-        dns_throw(OutOfRange, "Name::split: invalid split range");
+        isc_throw(OutOfRange, "Name::split: invalid split range");
     }
 
     Name retname;

+ 1 - 1
src/lib/dns/name.h

@@ -304,7 +304,7 @@ public:
     const uint8_t at(size_t pos) const
     {
         if (pos >= length_) {
-            dns_throw(OutOfRange, "Out of range access in Name::at()");
+            isc_throw(OutOfRange, "Out of range access in Name::at()");
         }
         return (ndata_[pos]);
     }

+ 10 - 10
src/lib/dns/rdata.cc

@@ -58,7 +58,7 @@ createRdata(const RRType& rrtype, const RRClass& rrclass,
             InputBuffer& buffer, size_t len)
 {
     if (len > MAX_RDLENGTH) {
-        dns_throw(InvalidRdataLength, "RDLENGTH too large");
+        isc_throw(InvalidRdataLength, "RDLENGTH too large");
     }
 
     size_t old_pos = buffer.getPosition();
@@ -68,7 +68,7 @@ createRdata(const RRType& rrtype, const RRClass& rrclass,
                                                    len);
                                                    
     if (buffer.getPosition() - old_pos != len) {
-        dns_throw(InvalidRdataLength, "RDLENGTH mismatch");
+        isc_throw(InvalidRdataLength, "RDLENGTH mismatch");
     }
 
     return (rdata);
@@ -110,7 +110,7 @@ struct GenericImpl {
 Generic::Generic(InputBuffer& buffer, size_t rdata_len)
 {
     if (rdata_len > MAX_RDLENGTH) {
-        dns_throw(InvalidRdataLength, "RDLENGTH too large");
+        isc_throw(InvalidRdataLength, "RDLENGTH too large");
     }
 
     vector<uint8_t> data(rdata_len);
@@ -125,7 +125,7 @@ Generic::Generic(const string& rdata_string)
     string unknown_mark;
     iss >> unknown_mark;
     if (unknown_mark != "\\#") {
-        dns_throw(InvalidRdataText,
+        isc_throw(InvalidRdataText,
                   "Missing the special token (\\#) for generic RDATA encoding");
     }
 
@@ -136,11 +136,11 @@ Generic::Generic(const string& rdata_string)
     int32_t rdlen;
     iss_rdlen >> rdlen;
     if (iss_rdlen.rdstate() != ios::eofbit) {
-        dns_throw(InvalidRdataText,
+        isc_throw(InvalidRdataText,
                   "Invalid representation for a generic RDLENGTH");
     }
     if (rdlen < 0 || rdlen > 0xffff) {
-        dns_throw(InvalidRdataLength, "RDATA length is out of range");
+        isc_throw(InvalidRdataLength, "RDATA length is out of range");
     }
     iss >> ws;                  // skip any white spaces
 
@@ -152,7 +152,7 @@ Generic::Generic(const string& rdata_string)
         char buf[2];
         iss.read(buf, sizeof(buf));
         if ((iss.rdstate() & (ios::badbit | ios::failbit)) != 0) {
-            dns_throw(InvalidRdataText,
+            isc_throw(InvalidRdataText,
                       "Invalid hex encoding of generic RDATA");
         }
 
@@ -161,7 +161,7 @@ Generic::Generic(const string& rdata_string)
         unsigned int ch;
         iss_byte >> hex >> ch;
         if (iss_byte.rdstate() != ios::eofbit) {
-            dns_throw(InvalidRdataText,
+            isc_throw(InvalidRdataText,
                       "Invalid hex encoding of generic RDATA");
         }
         data.push_back(ch);
@@ -169,12 +169,12 @@ Generic::Generic(const string& rdata_string)
     }
 
     if (!iss.eof()) {
-        dns_throw(InvalidRdataLength,
+        isc_throw(InvalidRdataLength,
                   "RDLENGTH is too small for generic RDATA");
     }
 
     if (data.size() != rdlen) {
-        dns_throw(InvalidRdataLength,
+        isc_throw(InvalidRdataLength,
                   "Generic RDATA code doesn't match RDLENGTH");
     }
 

+ 1 - 1
src/lib/dns/rdata/ch_3/a_1.cc

@@ -58,7 +58,7 @@ string
 A::toText() const
 {
     // TBD
-    dns_throw(InvalidRdataText, "Not implemented yet");
+    isc_throw(InvalidRdataText, "Not implemented yet");
 }
 
 int

+ 6 - 6
src/lib/dns/rdata/generic/dnskey_48.cc

@@ -59,23 +59,23 @@ DNSKEY::DNSKEY(const string& dnskey_str) :
 
     iss >> flags >> protocol >> algorithm >> &keydatabuf;
     if (iss.bad() || iss.fail()) {
-        dns_throw(InvalidRdataText, "Invalid DNSKEY text");
+        isc_throw(InvalidRdataText, "Invalid DNSKEY text");
     }
     if (flags > 0xffff) {
-        dns_throw(InvalidRdataText, "DNSKEY flags out of range");
+        isc_throw(InvalidRdataText, "DNSKEY flags out of range");
     }
     if (protocol > 0xff) {
-        dns_throw(InvalidRdataText, "DNSKEY protocol out of range");
+        isc_throw(InvalidRdataText, "DNSKEY protocol out of range");
     }
     if (algorithm > 0xff) {
-        dns_throw(InvalidRdataText, "DNSKEY algorithm out of range");
+        isc_throw(InvalidRdataText, "DNSKEY algorithm out of range");
     }
 
     vector<uint8_t> keydata;
     decodeBase64(keydatabuf.str(), keydata);
 
     if (algorithm == 1 && keydata.size() < 3) {
-        dns_throw(InvalidRdataLength, "DNSKEY keydata too short");
+        isc_throw(InvalidRdataLength, "DNSKEY keydata too short");
     }
 
     impl_ = new DNSKEYImpl(flags, protocol, algorithm, keydata);
@@ -84,7 +84,7 @@ DNSKEY::DNSKEY(const string& dnskey_str) :
 DNSKEY::DNSKEY(InputBuffer& buffer, size_t rdata_len)
 {
     if (rdata_len < 4) {
-        dns_throw(InvalidRdataLength, "DNSKEY too short");
+        isc_throw(InvalidRdataLength, "DNSKEY too short");
     }
 
     uint16_t flags = buffer.readUint16();

+ 5 - 5
src/lib/dns/rdata/generic/ds_43.cc

@@ -58,16 +58,16 @@ DS::DS(const string& ds_str) :
 
     iss >> tag >> algorithm >> digest_type >> &digestbuf;
     if (iss.bad() || iss.fail()) {
-        dns_throw(InvalidRdataText, "Invalid DS text");
+        isc_throw(InvalidRdataText, "Invalid DS text");
     }
     if (tag > 0xffff) {
-        dns_throw(InvalidRdataText, "DS tag out of range");
+        isc_throw(InvalidRdataText, "DS tag out of range");
     }
     if (algorithm > 0xff) {
-        dns_throw(InvalidRdataText, "DS algorithm out of range");
+        isc_throw(InvalidRdataText, "DS algorithm out of range");
     }
     if (digest_type > 0xff) {
-        dns_throw(InvalidRdataText, "DS digest type out of range");
+        isc_throw(InvalidRdataText, "DS digest type out of range");
     }
 
     vector<uint8_t> digest;
@@ -79,7 +79,7 @@ DS::DS(const string& ds_str) :
 DS::DS(InputBuffer& buffer, size_t rdata_len)
 {
     if (rdata_len < 4) {
-        dns_throw(InvalidRdataLength, "DS too short");
+        isc_throw(InvalidRdataLength, "DS too short");
     }
 
     uint16_t tag = buffer.readUint16();

+ 1 - 1
src/lib/dns/rdata/generic/mx_15.cc

@@ -48,7 +48,7 @@ MX::MX(const std::string& mx_str) :
     iss >> pref >> mxname;
 
     if (iss.bad() || iss.fail() || !iss.eof()) {
-        dns_throw(InvalidRdataText, "Invalid MX text format");
+        isc_throw(InvalidRdataText, "Invalid MX text format");
     }
 
     preference_ = pref;

+ 10 - 10
src/lib/dns/rdata/generic/nsec3_50.cc

@@ -65,16 +65,16 @@ NSEC3::NSEC3(const string& nsec3_str) :
 
     iss >> hashalg >> flags >> iterations >> salthex;
     if (iss.bad() || iss.fail()) {
-        dns_throw(InvalidRdataText, "Invalid NSEC3 text");
+        isc_throw(InvalidRdataText, "Invalid NSEC3 text");
     }
     if (hashalg > 0xf) {
-        dns_throw(InvalidRdataText, "NSEC3 hash algorithm out of range");
+        isc_throw(InvalidRdataText, "NSEC3 hash algorithm out of range");
     }
     if (flags > 0xff) {
-        dns_throw(InvalidRdataText, "NSEC3 flags out of range");
+        isc_throw(InvalidRdataText, "NSEC3 flags out of range");
     }
     if (iterations > 0xffff) {
-        dns_throw(InvalidRdataText, "NSEC3 iterations out of range");
+        isc_throw(InvalidRdataText, "NSEC3 iterations out of range");
     }
 
     vector<uint8_t> salt;
@@ -84,7 +84,7 @@ NSEC3::NSEC3(const string& nsec3_str) :
     iss >> setw(32) >> nextstr;
     vector<uint8_t> next;
     if (iss.bad() || iss.fail()) {
-        dns_throw(InvalidRdataText, "Invalid NSEC3 hash algorithm");
+        isc_throw(InvalidRdataText, "Invalid NSEC3 hash algorithm");
     }
     decodeBase32(nextstr, next);
 
@@ -101,7 +101,7 @@ NSEC3::NSEC3(const string& nsec3_str) :
                 code = RRType(type).getCode();
                 bitmap[code / 8] |= (0x80 >> (code % 8));
             } catch (...) {
-                dns_throw(InvalidRdataText, "Invalid RRtype in NSEC3");
+                isc_throw(InvalidRdataText, "Invalid RRtype in NSEC3");
             }
         }
     } while(!iss.eof());
@@ -128,7 +128,7 @@ NSEC3::NSEC3(const string& nsec3_str) :
 NSEC3::NSEC3(InputBuffer& buffer, size_t rdata_len)
 {
     if (rdata_len < 5) {
-        dns_throw(InvalidRdataLength, "NSEC3 too short");
+        isc_throw(InvalidRdataLength, "NSEC3 too short");
     }
 
     uint8_t hashalg = buffer.readUint8();
@@ -140,7 +140,7 @@ NSEC3::NSEC3(InputBuffer& buffer, size_t rdata_len)
     --rdata_len;
 
     if (rdata_len < saltlen) {
-        dns_throw(InvalidRdataLength, "NSEC3 salt too short");
+        isc_throw(InvalidRdataLength, "NSEC3 salt too short");
     }
 
     vector<uint8_t> salt(saltlen);
@@ -151,7 +151,7 @@ NSEC3::NSEC3(InputBuffer& buffer, size_t rdata_len)
     --rdata_len;
 
     if (rdata_len < nextlen) {
-        dns_throw(InvalidRdataLength, "NSEC3 next hash too short");
+        isc_throw(InvalidRdataLength, "NSEC3 next hash too short");
     }
 
     vector<uint8_t> next(nextlen);
@@ -159,7 +159,7 @@ NSEC3::NSEC3(InputBuffer& buffer, size_t rdata_len)
     rdata_len -= nextlen;
 
     if (rdata_len == 0) {
-        dns_throw(InvalidRdataLength, "NSEC3 type bitmap too short");
+        isc_throw(InvalidRdataLength, "NSEC3 type bitmap too short");
     }
 
     // FIXIT: we cannot naively copy the data because the bitmaps have

+ 5 - 5
src/lib/dns/rdata/generic/nsec3param_51.cc

@@ -57,13 +57,13 @@ NSEC3PARAM::NSEC3PARAM(const string& nsec3param_str) :
 
     iss >> hashalg >> flags >> iterations >> &saltbuf;
     if (iss.bad() || iss.fail()) {
-        dns_throw(InvalidRdataText, "Invalid NSEC3PARAM text");
+        isc_throw(InvalidRdataText, "Invalid NSEC3PARAM text");
     }
     if (hashalg > 0xf) {
-        dns_throw(InvalidRdataText, "NSEC3PARAM hash algorithm out of range");
+        isc_throw(InvalidRdataText, "NSEC3PARAM hash algorithm out of range");
     }
     if (flags > 0xff) {
-        dns_throw(InvalidRdataText, "NSEC3PARAM flags out of range");
+        isc_throw(InvalidRdataText, "NSEC3PARAM flags out of range");
     }
 
     vector<uint8_t> salt;
@@ -75,7 +75,7 @@ NSEC3PARAM::NSEC3PARAM(const string& nsec3param_str) :
 NSEC3PARAM::NSEC3PARAM(InputBuffer& buffer, size_t rdata_len)
 {
     if (rdata_len < 4) {
-        dns_throw(InvalidRdataLength, "NSEC3PARAM too short");
+        isc_throw(InvalidRdataLength, "NSEC3PARAM too short");
     }
 
     uint8_t hashalg = buffer.readUint8();
@@ -87,7 +87,7 @@ NSEC3PARAM::NSEC3PARAM(InputBuffer& buffer, size_t rdata_len)
     --rdata_len;
 
     if (rdata_len < saltlen) {
-        dns_throw(InvalidRdataLength, "NSEC3PARAM salt too short");
+        isc_throw(InvalidRdataLength, "NSEC3PARAM salt too short");
     }
 
     vector<uint8_t> salt(saltlen);

+ 3 - 3
src/lib/dns/rdata/generic/nsec_47.cc

@@ -56,7 +56,7 @@ NSEC::NSEC(const string& nsec_str) :
 
     iss >> nextname;
     if (iss.bad() || iss.fail()) {
-        dns_throw(InvalidRdataText, "Invalid NSEC name");
+        isc_throw(InvalidRdataText, "Invalid NSEC name");
     }
 
     memset(bitmap, 0, sizeof(bitmap));
@@ -68,7 +68,7 @@ NSEC::NSEC(const string& nsec_str) :
             code = RRType(type).getCode();
             bitmap[code / 8] |= (0x80 >> (code % 8));
         } catch (...) {
-            dns_throw(InvalidRdataText, "Invalid RRtype in NSEC");
+            isc_throw(InvalidRdataText, "Invalid RRtype in NSEC");
         }
     } while(!iss.eof());
 
@@ -98,7 +98,7 @@ NSEC::NSEC(InputBuffer& buffer, size_t rdata_len)
 
     // rdata_len must be sufficiently large to hold non empty bitmap.
     if (rdata_len <= buffer.getPosition() - pos) {
-        dns_throw(InvalidRdataLength, "NSEC too short");
+        isc_throw(InvalidRdataLength, "NSEC too short");
     }
     rdata_len -= (buffer.getPosition() - pos);
 

+ 2 - 2
src/lib/dns/rdata/generic/opt_41.cc

@@ -27,7 +27,7 @@ using namespace std;
 
 OPT::OPT(const string& type_str)
 {
-    dns_throw(InvalidRdataText, "OPT RR cannot be constructed from text");
+    isc_throw(InvalidRdataText, "OPT RR cannot be constructed from text");
 }
 
 OPT::OPT(InputBuffer& buffer, size_t rdata_len)
@@ -35,7 +35,7 @@ OPT::OPT(InputBuffer& buffer, size_t rdata_len)
     // setPosition() will throw against a short buffer anyway, but it's safer
     // to check it explicitly here.
     if (buffer.getLength() - buffer.getPosition() < rdata_len) {
-        dns_throw(InvalidRdataLength, "RDLEN of OPT is too large");
+        isc_throw(InvalidRdataLength, "RDLEN of OPT is too large");
     }
 
     // This simple implementation ignores any options

+ 5 - 5
src/lib/dns/rdata/generic/rrsig_46.cc

@@ -85,13 +85,13 @@ RRSIG::RRSIG(const string& rrsig_str) :
         >> expire_txt >> inception_txt >> tag >> signer_txt
         >> &signaturebuf;
     if (iss.bad() || iss.fail()) {
-        dns_throw(InvalidRdataText, "Invalid RRSIG text");
+        isc_throw(InvalidRdataText, "Invalid RRSIG text");
     }
     if (algorithm > 0xff) {
-        dns_throw(InvalidRdataText, "RRSIG algorithm out of range");
+        isc_throw(InvalidRdataText, "RRSIG algorithm out of range");
     }
     if (labels > 0xff) {
-        dns_throw(InvalidRdataText, "RRSIG labels out of range");
+        isc_throw(InvalidRdataText, "RRSIG labels out of range");
     }
 
     uint32_t timeexpire = DNSSECTimeFromText(expire_txt);
@@ -110,7 +110,7 @@ RRSIG::RRSIG(InputBuffer& buffer, size_t rdata_len)
     size_t pos = buffer.getPosition();
 
     if (rdata_len < RRSIG_MINIMUM_LEN) {
-        dns_throw(InvalidRdataLength, "RRSIG too short");
+        isc_throw(InvalidRdataLength, "RRSIG too short");
     }
 
     RRType covered(buffer);
@@ -124,7 +124,7 @@ RRSIG::RRSIG(InputBuffer& buffer, size_t rdata_len)
 
     // rdata_len must be sufficiently large to hold non empty signature data.
     if (rdata_len <= buffer.getPosition() - pos) {
-        dns_throw(InvalidRdataLength, "RRSIG too short");
+        isc_throw(InvalidRdataLength, "RRSIG too short");
     }
     rdata_len -= (buffer.getPosition() - pos);
 

+ 3 - 3
src/lib/dns/rdata/generic/soa_6.cc

@@ -47,19 +47,19 @@ SOA::SOA(const string& soastr) :
 
     iss >> token;
     if (iss.bad() || iss.fail()) {
-        dns_throw(InvalidRdataText, "Invalid SOA MNAME");
+        isc_throw(InvalidRdataText, "Invalid SOA MNAME");
     }
     mname_ = Name(token);
     iss >> token;
     if (iss.bad() || iss.fail()) {
-        dns_throw(InvalidRdataText, "Invalid SOA RNAME");
+        isc_throw(InvalidRdataText, "Invalid SOA RNAME");
     }
     rname_ = Name(token);
 
     uint32_t serial, refresh, retry, expire, minimum;
     iss >> serial >> refresh >> retry >> expire >> minimum;
     if (iss.rdstate() != ios::eofbit) {
-        dns_throw(InvalidRdataText, "Invalid SOA format");
+        isc_throw(InvalidRdataText, "Invalid SOA format");
     }
     OutputBuffer buffer(20);
     buffer.writeUint32(serial);

+ 1 - 1
src/lib/dns/rdata/generic/txt_16.cc

@@ -53,7 +53,7 @@ TXT::TXT(const std::string& txtstr)
         length -= 2;
     }
     if (length > MAX_CHARSTRING_LEN) {
-        dns_throw(CharStringTooLong, "");
+        isc_throw(CharStringTooLong, "");
     }
 
     vector<uint8_t> data;

+ 1 - 1
src/lib/dns/rdata/hs_4/a_1.cc

@@ -58,7 +58,7 @@ string
 A::toText() const
 {
     // TBD
-    dns_throw(InvalidRdataText, "Not implemented yet");
+    isc_throw(InvalidRdataText, "Not implemented yet");
 }
 
 int

+ 3 - 3
src/lib/dns/rdata/in_1/a_1.cc

@@ -40,7 +40,7 @@ A::A(const string& addrstr)
     // This is exactly what inet_pton() accepts for AF_INET.  In particular,
     // it rejects an abbreviated form such as "10.1" meaning "10.0.0.1".
     if (inet_pton(AF_INET, addrstr.c_str(), &addr_) != 1) {
-        dns_throw(InvalidRdataText,
+        isc_throw(InvalidRdataText,
                   "failed to parse IPv4 address for IN/A RDATA");
     }
 }
@@ -48,7 +48,7 @@ A::A(const string& addrstr)
 A::A(InputBuffer& buffer, size_t rdata_len)
 {
     if (rdata_len != sizeof(addr_)) {
-        dns_throw(InvalidRdataLength, "Length mismatch for IN/A RDATA");
+        isc_throw(InvalidRdataLength, "Length mismatch for IN/A RDATA");
     }
     buffer.readData(&addr_, sizeof(addr_));
 }
@@ -75,7 +75,7 @@ A::toText() const
     char addr_string[sizeof("255.255.255.255")];
 
     if (inet_ntop(AF_INET, &addr_, addr_string, sizeof(addr_string)) == NULL) {
-        dns_throw(Unexpected, "inet_ntop failed for an IPv4 address");
+        isc_throw(Unexpected, "inet_ntop failed for an IPv4 address");
     }
 
     return (string(addr_string));

+ 3 - 3
src/lib/dns/rdata/in_1/aaaa_28.cc

@@ -36,7 +36,7 @@ using namespace std;
 AAAA::AAAA(const string& addrstr)
 {
     if (inet_pton(AF_INET6, addrstr.c_str(), &addr_) != 1) {
-        dns_throw(InvalidRdataText,
+        isc_throw(InvalidRdataText,
                   "failed to parse IPv6 address for IN/AAAA RDATA");
     }
 }
@@ -44,7 +44,7 @@ AAAA::AAAA(const string& addrstr)
 AAAA::AAAA(InputBuffer& buffer, size_t rdata_len)
 {
     if (rdata_len != sizeof(addr_)) {
-        dns_throw(InvalidRdataLength, "Length mismatch for IN/AAAA RDATA");
+        isc_throw(InvalidRdataLength, "Length mismatch for IN/AAAA RDATA");
     }
     buffer.readData(&addr_, sizeof(addr_));
 }
@@ -72,7 +72,7 @@ AAAA::toText() const
     char addr_string[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
 
     if (inet_ntop(AF_INET6, &addr_, addr_string, sizeof(addr_string)) == NULL) {
-        dns_throw(Unexpected, "inet_ntop failed for an IPv6 address");
+        isc_throw(Unexpected, "inet_ntop failed for an IPv6 address");
     }
 
     return (string(addr_string));

+ 1 - 1
src/lib/dns/rrclass.cc

@@ -38,7 +38,7 @@ RRClass::RRClass(const string& classstr)
 RRClass::RRClass(InputBuffer& buffer)
 {
     if (buffer.getLength() - buffer.getPosition() < sizeof(uint16_t)) {
-        dns_throw(IncompleteRRClass, "incomplete wire-format RR class");
+        isc_throw(IncompleteRRClass, "incomplete wire-format RR class");
     }
     classcode_ = buffer.readUint16();
 }

+ 2 - 2
src/lib/dns/rrparamregistry-placeholder.cc

@@ -352,7 +352,7 @@ addParam(const string& code_string, uint16_t code, MC& codemap, MS& stringmap)
     typename MC::const_iterator found = codemap.find(code);
     if (found != codemap.end()) {
         if (found->second->code_string_ != code_string) {
-            dns_throw(ET, "Duplicate RR parameter registration");
+            isc_throw(ET, "Duplicate RR parameter registration");
         }
         return (false);
     }
@@ -418,7 +418,7 @@ textToCode(const string& code_str, MS& stringmap)
             return (code);
         }
     }
-    dns_throw(ET, "Unrecognized RR parameter string");
+    isc_throw(ET, "Unrecognized RR parameter string");
 }
 
 template <typename PT, typename MC>

+ 2 - 2
src/lib/dns/rrset.cc

@@ -48,7 +48,7 @@ AbstractRRset::toText() const
 
     it->first();
     if (it->isLast()) {
-        dns_throw(EmptyRRset, "ToText() is attempted for an empty RRset");
+        isc_throw(EmptyRRset, "ToText() is attempted for an empty RRset");
     }
 
     do {
@@ -71,7 +71,7 @@ rrsetToWire(const AbstractRRset& rrset, T& output)
 
     it->first();
     if (it->isLast()) {
-        dns_throw(EmptyRRset, "ToWire() is attempted for an empty RRset");
+        isc_throw(EmptyRRset, "ToWire() is attempted for an empty RRset");
     }
 
     // sort the set of Rdata based on rrset-order and sortlist, and possible

+ 1 - 1
src/lib/dns/rrsetlist.cc

@@ -33,7 +33,7 @@ RRsetList::addRRset(RRsetPtr rrsetptr)
     ConstRRsetPtr rrset_found = findRRset(rrsetptr->getType(),
                                           rrsetptr->getClass());
     if (rrset_found != NULL) {
-        dns_throw(DuplicateRRset, "");
+        isc_throw(DuplicateRRset, "");
     }
     rrsets_.push_back(rrsetptr);
 }

+ 2 - 2
src/lib/dns/rrttl.cc

@@ -41,14 +41,14 @@ RRTTL::RRTTL(const string& ttlstr)
     if (iss.rdstate() == ios::eofbit && val >= 0 && val <= 0xffffffff) {
         ttlval_ = static_cast<uint32_t>(val);
     } else {
-        dns_throw(InvalidRRTTL, "invalid TTL");
+        isc_throw(InvalidRRTTL, "invalid TTL");
     }
 }
 
 RRTTL::RRTTL(InputBuffer& buffer)
 {
     if (buffer.getLength() - buffer.getPosition() < sizeof(uint32_t)) {
-        dns_throw(IncompleteRRTTL, "incomplete wire-format TTL value");
+        isc_throw(IncompleteRRTTL, "incomplete wire-format TTL value");
     }
     ttlval_ = buffer.readUint32();
 }

+ 1 - 1
src/lib/dns/rrtype.cc

@@ -39,7 +39,7 @@ RRType::RRType(const string& typestr)
 RRType::RRType(InputBuffer& buffer)
 {
     if (buffer.getLength() - buffer.getPosition() < sizeof(uint16_t)) {
-        dns_throw(IncompleteRRType, "incomplete wire-format RR type");
+        isc_throw(IncompleteRRType, "incomplete wire-format RR type");
     }
     typecode_ = buffer.readUint16();
 }

+ 2 - 2
src/lib/exceptions/exceptions.h

@@ -25,7 +25,7 @@ namespace isc {
 ///
 /// This is a base class for exceptions thrown from the DNS library module.
 /// Normally, the exceptions are thrown via a convenient shortcut macro,
-/// @ref dns_throw, which automatically gives trivial parameters for the
+/// @ref isc_throw, which automatically gives trivial parameters for the
 /// exception such as the file name and line number where the exception is
 /// triggered.
 ///
@@ -125,7 +125,7 @@ public:
 ///
 /// A shortcut macro to insert known values into exception arguments.
 ///
-#define dns_throw(type, args...) throw type(__FILE__, __LINE__, args)
+#define isc_throw(type, args...) throw type(__FILE__, __LINE__, args)
 
 }
 #endif // __EXCEPTIONS_H

+ 2 - 2
src/lib/exceptions/exceptions_unittest.cc

@@ -33,7 +33,7 @@ protected:
 
 TEST_F(ExceptionTest, basicMethods) {
     try {
-        dns_throw(Exception, teststring);
+        isc_throw(Exception, teststring);
     } catch (Exception& ex) {
         EXPECT_EQ(ex.getMessage(), std::string(teststring));
         EXPECT_EQ(ex.getFile(), std::string(__FILE__));
@@ -44,7 +44,7 @@ TEST_F(ExceptionTest, basicMethods) {
 // Test to see if it works as a proper derived class of std::exception.
 TEST_F(ExceptionTest, stdInheritance) {
     try {
-        dns_throw(Exception, teststring);
+        isc_throw(Exception, teststring);
     } catch (std::exception& ex) {
         EXPECT_EQ(std::string(ex.what()), std::string(teststring));
     }