TITLE: HandlerTable _loadHandler method should assert instead of throwing Exception
DESCRIPTION: Modified _loadHandler to assert instead of throwing Exception.
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);
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