summaryrefslogtreecommitdiffstats
path: root/src/lib/exceptions
diff options
context:
space:
mode:
authorJINMEI Tatuya <jinmei@isc.org>2010-03-07 08:06:42 +0100
committerJINMEI Tatuya <jinmei@isc.org>2010-03-07 08:06:42 +0100
commit9857db046874a0372f17769eb55cfc0b97e21668 (patch)
tree6d7f6e1a7f07d59857e67d8fbfd29f3e2eafd5b4 /src/lib/exceptions
parenta minor clarification comment about sqlite3_close() (diff)
downloadkea-9857db046874a0372f17769eb55cfc0b97e21668.tar.xz
kea-9857db046874a0372f17769eb55cfc0b97e21668.zip
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
Diffstat (limited to 'src/lib/exceptions')
-rw-r--r--src/lib/exceptions/exceptions.h4
-rw-r--r--src/lib/exceptions/exceptions_unittest.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/exceptions/exceptions.h b/src/lib/exceptions/exceptions.h
index 9c496c2a00..076a598442 100644
--- a/src/lib/exceptions/exceptions.h
+++ b/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
diff --git a/src/lib/exceptions/exceptions_unittest.cc b/src/lib/exceptions/exceptions_unittest.cc
index a15345f7c6..96c205a0a5 100644
--- a/src/lib/exceptions/exceptions_unittest.cc
+++ b/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));
}