Browse Source

[4000] Changes after review:

 - distinction between ISC and std exceptions removed.
 - reference to support ticket removed.
Tomek Mrugalski 9 years ago
parent
commit
692f3dd0ac

+ 2 - 6
src/bin/dhcp4/dhcp4_messages.mes

@@ -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

+ 3 - 12
src/bin/dhcp4/dhcp4_srv.cc

@@ -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());
         }
 

+ 2 - 6
src/bin/dhcp6/dhcp6_messages.mes

@@ -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

+ 2 - 13
src/bin/dhcp6/dhcp6_srv.cc

@@ -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();

+ 2 - 2
src/lib/util/tests/process_spawn_unittest.cc

@@ -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);
 }