]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4000] Changes after review:
authorTomek Mrugalski <tomasz@isc.org>
Tue, 25 Aug 2015 14:12:40 +0000 (16:12 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 25 Aug 2015 14:12:40 +0000 (16:12 +0200)
 - distinction between ISC and std exceptions removed.
 - reference to support ticket removed.

src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/dhcp6_srv.cc
src/lib/util/tests/process_spawn_unittest.cc

index 5cb2bb1841c6f1fbd36dc67ea75d267ab9deff5d..b269e024b5790012b54d5324a5e6eedd2a54a2a7 100644 (file)
@@ -201,12 +201,8 @@ from a client. Server does not process empty Hostname options and therefore
 option is skipped. The argument holds the client and transaction identification
 information.
 
-% DHCP4_HANDLE_SIGNAL_EXCEPTION_ISC An ISC exception was thrown while handing signal: %1
-This error message is printed when an ISC exception was raised during signal
-processing. This likely indicates a coding error and should be reported to ISC.
-
-% DHCP4_HANDLE_SIGNAL_EXCEPTION_STD An standard exception was thrown while handing signal: %1
-This error message is printed when a standard type exception was raised during signal
+% DHCP4_HANDLE_SIGNAL_EXCEPTION An exception was thrown while handing signal: %1
+This error message is printed when an ISC or standard exception was raised during signal
 processing. This likely indicates a coding error and should be reported to ISC.
 
 % DHCP4_HOOKS_LIBS_RELOAD_FAIL reload of hooks libraries failed
index f3ad0ca97e0f6ab163a9af17ff99bc984c50c464..634b0b2309efe3fea867b91c20792f9e19b4f54b 100644 (file)
@@ -422,19 +422,10 @@ Dhcpv4Srv::run() {
         // of select() to terminate.
         try {
             handleSignal();
-        } catch (const isc::Exception& e) {
-            // ISC-derived exception occurred. The nature of this exception
-            // indicates that it originated from ISC code. If this happens,
-            // it will be easy to fix as it is in the code that is under
-            // ISC control.
-            LOG_ERROR(dhcp4_logger, DHCP4_HANDLE_SIGNAL_EXCEPTION_ISC)
-                .arg(e.what());
         } catch (const std::exception& e) {
-            // Standard exception occurred. The nature of this exception
-            // indicates that it was caused in non-ISC code. Fixing this
-            // issue will be somewhat more difficult than the one caused
-            // by ISC code.
-            LOG_ERROR(dhcp4_logger, DHCP4_HANDLE_SIGNAL_EXCEPTION_STD)
+            // Standard exception occurred. Let's be on the safe side to
+            // catch std::exception.
+            LOG_ERROR(dhcp4_logger, DHCP4_HANDLE_SIGNAL_EXCEPTION)
                 .arg(e.what());
         }
 
index 1bc74200f27209e791c5da570ac0ad4c53792e4f..28cacdefa796a9b8d7daf8ca989aa47cfcc8c388 100644 (file)
@@ -242,12 +242,8 @@ probable if you see many such messages. Clients will recover from this,
 but they will most likely get a different IP addresses and experience
 a brief service interruption.
 
-% DHCP6_HANDLE_SIGNAL_EXCEPTION_ISC An ISC exception was thrown while handing signal: %1
-This error message is printed when an ISC exception was raised during signal
-processing. This likely indicates a coding error and should be reported to ISC.
-
-% DHCP6_HANDLE_SIGNAL_EXCEPTION_STD An standard exception was thrown while handing signal: %1
-This error message is printed when a standard type exception was raised during signal
+% DHCP6_HANDLE_SIGNAL_EXCEPTION An exception was thrown while handing signal: %1
+This error message is printed when an exception was raised during signal
 processing. This likely indicates a coding error and should be reported to ISC.
 
 % DHCP6_HOOKS_LIBS_RELOAD_FAIL reload of hooks libraries failed
index 54a36ca0b2a98308edd28bf38d8f8c41dcc0f28a..133fb3a38062723a7b23e86b63344470e6689b6d 100644 (file)
@@ -384,23 +384,12 @@ bool Dhcpv6Srv::run() {
         // terminate.
         try {
             handleSignal();
-                    } catch (const isc::Exception& e) {
-            // ISC-derived exception occurred. The nature of this exception
-            // indicates that it originated from ISC code. If this happens,
-            // it will be easy to fix as it is in the code that is under
-            // ISC control.
-            LOG_ERROR(dhcp6_logger, DHCP6_HANDLE_SIGNAL_EXCEPTION_ISC)
-                .arg(e.what());
         } catch (const std::exception& e) {
-            // Standard exception occurred. The nature of this exception
-            // indicates that it was caused in non-ISC code. Fixing this
-            // issue will be somewhat more difficult than the one caused
-            // by ISC code.
-            LOG_ERROR(dhcp6_logger, DHCP6_HANDLE_SIGNAL_EXCEPTION_STD)
+            // An (a standard or ISC) exception occurred.
+            LOG_ERROR(dhcp6_logger, DHCP6_HANDLE_SIGNAL_EXCEPTION)
                 .arg(e.what());
         }
 
-
         // Execute ready timers for the lease database, e.g. Lease File Cleanup.
         try {
             LeaseMgrFactory::instance().getIOService()->poll();
index 1aea10df15d039507eee6a63824ad165a3316261..3e4186f6025798337bf0ef2acac87f84ac175366 100644 (file)
@@ -232,9 +232,9 @@ TEST(ProcessSpawn, errnoInvariance) {
 
     EXPECT_EQ(64, process.getExitStatus(pid));
 
-    // errno value should NOT be set to be preserved, despite the SIGCHILD
+    // errno value should be set to be preserved, despite the SIGCHILD
     // handler (ProcessSpawnImpl::waitForProcess) calling waitpid(), which
-    // will likely set errno to ECHILD. See trac4000 and support 8785.
+    // will likely set errno to ECHILD. See trac4000.
     EXPECT_EQ(123, errno);
 }