From 926b88995bbcf3f03a0fcdd455eafffff1a5673a Mon Sep 17 00:00:00 2001
From: fguigues <fguigues@localhost>
Date: Mon, 19 May 2008 13:09:03 +0000
Subject: [PATCH] Fixes :

---
 opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandler.java |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandler.java b/opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandler.java
index f13a30f..36625ca 100644
--- a/opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandler.java
+++ b/opends/src/snmp/src/org/opends/server/snmp/SNMPConnectionHandler.java
@@ -46,7 +46,9 @@
 
 import org.opends.server.admin.std.server.SNMPConnectionHandlerCfg;
 
+import org.opends.server.config.ConfigException;
 import org.opends.server.core.DirectoryServer;
+import org.opends.server.types.InitializationException;
 import static org.opends.messages.ProtocolMessages.*;
 import static org.opends.server.loggers.ErrorLogger.*;
 
@@ -92,9 +94,9 @@
     /**
      * {@inheritDoc}
      */
-    @Override()
     public void initializeConnectionHandler(
-            SNMPConnectionHandlerCfg configuration) {
+            SNMPConnectionHandlerCfg configuration)
+            throws ConfigException, InitializationException {
 
         if (configuration == null) {
             Message message = ERR_SNMP_CONNHANDLER_NO_CONFIGURATION.get();
@@ -145,8 +147,14 @@
         this.provider = new SNMPClassLoaderProvider();
 
         // Call the delegate class
-        this.provider.initializeConnectionHandler(this.currentConfig);
-
+        try {
+          this.provider.initializeConnectionHandler(this.currentConfig);
+        }
+        catch (Exception ex) {
+            Message message = ERR_SNMP_CONNHANDLER_BAD_CONFIGURATION.get();
+            logError(message);
+            return;
+        }
     }
 
     /**

--
Gitblit v1.10.0