diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/PluginManagerI.cpp | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/cpp/src/Ice/PluginManagerI.cpp b/cpp/src/Ice/PluginManagerI.cpp index 11b2416479b..a5cc108d04f 100644 --- a/cpp/src/Ice/PluginManagerI.cpp +++ b/cpp/src/Ice/PluginManagerI.cpp @@ -182,36 +182,16 @@ Ice::PluginManagerI::loadPlugin(const string& name, const string& entryPoint, co } // - // Invoke the factory function. + // Invoke the factory function. No exceptions can be raised + // by the factory function because it's declared extern "C". // PLUGIN_FACTORY factory = (PLUGIN_FACTORY)sym; - try + plugin = factory(_communicator, name, args); + if(!plugin) { - plugin = factory(_communicator, name, args); - } - catch(const Exception& ex) - { - // - // Do NOT propagate the exception from the entry point, - // because the library will be closed. - // - ostringstream out; - out << "exception in entry point `" << entryPoint << "'\n" - << "original exception:\n" - << ex; PluginInitializationException e(__FILE__, __LINE__); - e.reason = out.str(); - throw e; - } - catch (...) - { - // - // Do NOT propagate the exception from the entry point, - // because the library will be closed. - // ostringstream out; - out << "unknown exception in entry point `" << entryPoint << "'\n"; - PluginInitializationException e(__FILE__, __LINE__); + out << "failure in entry point `" << entryPoint << "'"; e.reason = out.str(); throw e; } |