Browse Source

[2983] Pushed minor change to CalloutManager

Tomek Mrugalski 11 years ago
parent
commit
8abbdb589f
2 changed files with 4 additions and 3 deletions
  1. 3 2
      src/lib/hooks/callout_manager.cc
  2. 1 1
      src/lib/hooks/hooks_messages.mes

+ 3 - 2
src/lib/hooks/callout_manager.cc

@@ -157,12 +157,13 @@ CalloutManager::callCallouts(int hook_index, CalloutHandle& callout_handle) {
                             .getName(current_hook_))
                         .arg(PointerConverter(i->second).dlsymPtr());
                 }
-            } catch (...) {
+            } catch (const std::exception& e) {
                 // Any exception, not just ones based on isc::Exception
                 LOG_ERROR(hooks_logger, HOOKS_CALLOUT_EXCEPTION)
                     .arg(current_library_)
                     .arg(ServerHooks::getServerHooks().getName(current_hook_))
-                    .arg(PointerConverter(i->second).dlsymPtr());
+                    .arg(PointerConverter(i->second).dlsymPtr())
+                    .arg(e.what());
             }
 
         }

+ 1 - 1
src/lib/hooks/hooks_messages.mes

@@ -44,7 +44,7 @@ is issued.  It identifies the hook to which the callout is attached, the
 index of the library (in the list of loaded libraries) that registered
 it and the address of the callout.  The error is otherwise ignored.
 
-% HOOKS_CALLOUT_EXCEPTION exception thrown by callout on hook %1 registered by library with index %2 (callout address %3)
+% HOOKS_CALLOUT_EXCEPTION exception thrown by callout on hook %1 registered by library with index %2 (callout address %3): %4
 If a callout throws an exception when called, this error message is
 issued.  It identifies the hook to which the callout is attached, the
 index of the library (in the list of loaded libraries) that registered