[svn] commit: r1337 - in /trunk/src/lib/dns: Makefile.am exceptions.cc exceptions.h message.cc message.h tests/message_unittest.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Mar 11 22:45:47 UTC 2010
Author: jinmei
Date: Thu Mar 11 22:45:47 2010
New Revision: 1337
Log:
declared/defined DNSProtocolError in separate files as these would be
used in other places than the message class.
Added:
trunk/src/lib/dns/exceptions.cc (with props)
trunk/src/lib/dns/exceptions.h (with props)
Modified:
trunk/src/lib/dns/Makefile.am
trunk/src/lib/dns/message.cc
trunk/src/lib/dns/message.h
trunk/src/lib/dns/tests/message_unittest.cc
Modified: trunk/src/lib/dns/Makefile.am
==============================================================================
--- trunk/src/lib/dns/Makefile.am (original)
+++ trunk/src/lib/dns/Makefile.am Thu Mar 11 22:45:47 2010
@@ -10,6 +10,7 @@
lib_LTLIBRARIES = libdns.la
libdns_la_SOURCES = buffer.h name.cc name.h messagerenderer.h messagerenderer.cc
+libdns_la_SOURCES += exceptions.h exceptions.cc
libdns_la_SOURCES += rrparamregistry.h rrparamregistry.cc
libdns_la_SOURCES += rrclass.h rrclass.cc rrtype.h rrtype.cc rrttl.h rrttl.cc
libdns_la_SOURCES += rdata.h rdata.cc
Modified: trunk/src/lib/dns/message.cc
==============================================================================
--- trunk/src/lib/dns/message.cc (original)
+++ trunk/src/lib/dns/message.cc Thu Mar 11 22:45:47 2010
@@ -27,6 +27,7 @@
#include <exceptions/exceptions.h>
#include "buffer.h"
+#include "exceptions.h"
#include "message.h"
#include "messagerenderer.h"
#include "name.h"
@@ -151,16 +152,6 @@
"RESERVED14",
"RESERVED15"
};
-}
-
-const Rcode&
-DNSMessageFORMERR::getRcode() const {
- return (Rcode::FORMERR());
-}
-
-const Rcode&
-DNSMessageBADVERS::getRcode() const {
- return (Rcode::BADVERS());
}
string
Modified: trunk/src/lib/dns/message.h
==============================================================================
--- trunk/src/lib/dns/message.h (original)
+++ trunk/src/lib/dns/message.h Thu Mar 11 22:45:47 2010
@@ -26,32 +26,6 @@
namespace isc {
namespace dns {
-
-///
-/// \brief A standard DNS module exception ...[TBD]
-///
-class Rcode; // forward declaration
-
-class DNSProtocolError : public Exception {
-public:
- DNSProtocolError(const char* file, size_t line, const char* what) :
- isc::Exception(file, line, what) {}
- virtual const Rcode& getRcode() const = 0;
-};
-
-class DNSMessageFORMERR : public DNSProtocolError {
-public:
- DNSMessageFORMERR(const char* file, size_t line, const char* what) :
- DNSProtocolError(file, line, what) {}
- virtual const Rcode& getRcode() const;
-};
-
-class DNSMessageBADVERS : public DNSProtocolError {
-public:
- DNSMessageBADVERS(const char* file, size_t line, const char* what) :
- DNSProtocolError(file, line, what) {}
- virtual const Rcode& getRcode() const;
-};
///
/// \brief A standard DNS module exception ...[TBD]
Modified: trunk/src/lib/dns/tests/message_unittest.cc
==============================================================================
--- trunk/src/lib/dns/tests/message_unittest.cc (original)
+++ trunk/src/lib/dns/tests/message_unittest.cc Thu Mar 11 22:45:47 2010
@@ -17,6 +17,7 @@
#include <exceptions/exceptions.h>
#include <dns/buffer.h>
+#include <dns/exceptions.h>
#include <dns/message.h>
#include <dns/messagerenderer.h>
#include <dns/question.h>
More information about the bind10-changes
mailing list