summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/SslSystemOpenSSL.cpp
diff options
context:
space:
mode:
authorAnthony Neal <aneal@zeroc.com>2002-03-15 19:10:11 +0000
committerAnthony Neal <aneal@zeroc.com>2002-03-15 19:10:11 +0000
commitf7b0dbc3d03677e9179d11ef046f5c93dd359ae6 (patch)
tree6587c62e7d385b70dce982440fbf8e48f3e27d09 /cpp/src/Ice/SslSystemOpenSSL.cpp
parentadding hashCode (diff)
downloadice-f7b0dbc3d03677e9179d11ef046f5c93dd359ae6.tar.bz2
ice-f7b0dbc3d03677e9179d11ef046f5c93dd359ae6.tar.xz
ice-f7b0dbc3d03677e9179d11ef046f5c93dd359ae6.zip
Added new, more descriptive of the problem, IceSSL exceptions.
Diffstat (limited to 'cpp/src/Ice/SslSystemOpenSSL.cpp')
-rw-r--r--cpp/src/Ice/SslSystemOpenSSL.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/cpp/src/Ice/SslSystemOpenSSL.cpp b/cpp/src/Ice/SslSystemOpenSSL.cpp
index 3b86f2bf1aa..aa53b1e31a5 100644
--- a/cpp/src/Ice/SslSystemOpenSSL.cpp
+++ b/cpp/src/Ice/SslSystemOpenSSL.cpp
@@ -40,7 +40,8 @@ using namespace std;
using IceInternal::TraceLevelsPtr;
using Ice::LoggerPtr;
-using IceSSL::OpenSSL::ContextException;
+using IceSSL::OpenSSL::ContextException;
+using IceSSL::OpenSSL::UnsupportedContextException;
using IceSSL::SystemInternalPtr;
IceSSL::ConnectionPtr
@@ -48,7 +49,11 @@ IceSSL::OpenSSL::System::createConnection(ContextType connectionType, int socket
{
if (connectionType == ClientServer)
{
- // TODO: Throw exception, Unsupported Context Type?
+ UnsupportedContextException unsupportedException(__FILE__, __LINE__);
+
+ unsupportedException._message = "Unable to create ClientServer connections.";
+
+ throw unsupportedException;
}
// Configure the context if need be.
@@ -174,7 +179,7 @@ IceSSL::OpenSSL::System::loadConfig(ContextType contextType,
{
if (configFile.empty())
{
- IceSSL::OpenSSL::ContextException contextEx(__FILE__, __LINE__);
+ IceSSL::ConfigurationLoadingException configEx(__FILE__, __LINE__);
string contextString;
@@ -199,11 +204,11 @@ IceSSL::OpenSSL::System::loadConfig(ContextType contextType,
}
}
- contextEx._message = "No SSL configuration file specified for ";
- contextEx._message += contextString;
- contextEx._message += ".";
+ configEx._message = "No SSL configuration file specified for ";
+ configEx._message += contextString;
+ configEx._message += ".";
- throw contextEx;
+ throw configEx;
}
Parser sslConfig(configFile, certPath);