BUG#: 5376
authorcarolann.graves <carolann.graves>
Wed, 16 Aug 2006 23:05:53 +0000 (23:05 +0000)
committercarolann.graves <carolann.graves>
Wed, 16 Aug 2006 23:05:53 +0000 (23:05 +0000)
TITLE: HandlerTable _loadHandler method should assert instead of throwing Exception

DESCRIPTION: Modified _loadHandler to assert instead of throwing Exception.

src/Pegasus/HandlerService/HandlerTable.cpp
src/Pegasus/HandlerService/HandlerTable.h

index 79793fb4b6b5b750298a801b524b91c2349a94b1..ede03cd67efe5298fa4e312486f7f351acf6f572 100644 (file)
@@ -138,12 +138,12 @@ CIMHandler* HandlerTable::_loadHandler(const String& handlerId)
 
     entry.handler = func(handlerId);
 
-    if (!entry.handler)
-    {
-       throw CreateHandlerReturnedNull(
-           fileName,
-           "PegasusCreateHandler");
-    }
+    //
+    //  ATTN: to support dynamically pluggable handlers, the entry.handler
+    //  returned from the PegasusCreateHandler_<handlerId> function would
+    //  need to be validated to be non-null
+    //
+    PEGASUS_ASSERT(entry.handler);
 
     _handlers.append(entry);
 
index ecf7b179357d6aa755bc4b87446a0f9d4480e85e..4a99a8d78ca902ef1120e050c40c84c668211466 100644 (file)
 
 PEGASUS_NAMESPACE_BEGIN
 
-class PEGASUS_HANDLER_SERVICE_LINKAGE 
-CreateHandlerReturnedNull : public Exception
-{
-public:
-
-    CreateHandlerReturnedNull(
-       const String& libName,
-       const String& funcName)
-       : Exception(funcName + " returned null in library " + libName) { }
-};
-
 // The handler table maintains a list of handlers which have been
 // dynamically loaded. It maintains a mapping between string
 // handler identifiers and handlers. Indication Processor will use the