diff options
Diffstat (limited to 'cpp/src/IceSSL/OpenSSLPluginI.cpp')
-rw-r--r-- | cpp/src/IceSSL/OpenSSLPluginI.cpp | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/cpp/src/IceSSL/OpenSSLPluginI.cpp b/cpp/src/IceSSL/OpenSSLPluginI.cpp index 74096530822..c6b4da8ca4e 100644 --- a/cpp/src/IceSSL/OpenSSLPluginI.cpp +++ b/cpp/src/IceSSL/OpenSSLPluginI.cpp @@ -68,19 +68,33 @@ create(const CommunicatorPtr& communicator, const string& name, const StringSeq& try { plugin->configure(); + + // + // Install the SSL endpoint factory + // + EndpointFactoryPtr sslEndpointFactory = new SslEndpointFactory(plugin); + facade->addEndpointFactory(sslEndpointFactory); } - catch (...) + catch(const Exception& ex) { Ice::PluginPtr ptr = plugin; // Reclaim the plug-in instance - // TODO: can't throw from an extern "C" function - // throw; + + Error out(communicator->getLogger()); + out << "exception in IceSSL plug-in:\n" << ex; + + // Can't throw from an extern "C" function + return 0; } + catch (...) + { + Ice::PluginPtr ptr = plugin; // Reclaim the plug-in instance + + Error out(communicator->getLogger()); + out << "unknown exception in IceSSL plug-in"; - // - // Install the SSL endpoint factory - // - EndpointFactoryPtr sslEndpointFactory = new SslEndpointFactory(plugin); - facade->addEndpointFactory(sslEndpointFactory); + // Can't throw from an extern "C" function + return 0; + } return plugin; } |