summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/WSTransceiver.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-01-08 21:10:14 +0100
committerJose <jose@zeroc.com>2016-01-08 21:10:14 +0100
commit93ab5a8f08970ad49c6f973b965b8fbefb63882f (patch)
tree18c00abdc514ca90a7ab6e1acc5b350847843681 /cpp/src/Ice/WSTransceiver.cpp
parentC++98 test minor build fix (diff)
downloadice-93ab5a8f08970ad49c6f973b965b8fbefb63882f.tar.bz2
ice-93ab5a8f08970ad49c6f973b965b8fbefb63882f.tar.xz
ice-93ab5a8f08970ad49c6f973b965b8fbefb63882f.zip
C++11 fix Exception::ice_clone to use exception_ptr
Diffstat (limited to 'cpp/src/Ice/WSTransceiver.cpp')
-rw-r--r--cpp/src/Ice/WSTransceiver.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/cpp/src/Ice/WSTransceiver.cpp b/cpp/src/Ice/WSTransceiver.cpp
index bd9254a22bb..e172651c026 100644
--- a/cpp/src/Ice/WSTransceiver.cpp
+++ b/cpp/src/Ice/WSTransceiver.cpp
@@ -416,7 +416,11 @@ IceInternal::WSTransceiver::initialize(Buffer& readBuffer, Buffer& writeBuffer)
}
SocketOperation
+#ifdef ICE_CPP11_MAPPING
+IceInternal::WSTransceiver::closing(bool initiator, exception_ptr reason)
+#else
IceInternal::WSTransceiver::closing(bool initiator, const Ice::LocalException& reason)
+#endif
{
if(_instance->traceLevel() >= 1)
{
@@ -446,6 +450,38 @@ IceInternal::WSTransceiver::closing(bool initiator, const Ice::LocalException& r
}
_closingInitiator = initiator;
+#ifdef ICE_CPP11_MAPPING
+ if(reason)
+ {
+ try
+ {
+ rethrow_exception(reason);
+ }
+ catch(const Ice::CloseConnectionException&)
+ {
+ _closingReason = CLOSURE_NORMAL;
+ }
+ catch(const Ice::ObjectAdapterDeactivatedException&)
+ {
+ _closingReason = CLOSURE_SHUTDOWN;
+ }
+ catch(Ice::CommunicatorDestroyedException&)
+ {
+ _closingReason = CLOSURE_SHUTDOWN;
+ }
+ catch(const Ice::MemoryLimitException&)
+ {
+ _closingReason = CLOSURE_TOO_BIG;
+ }
+ catch(const Ice::ProtocolException&)
+ {
+ _closingReason = CLOSURE_PROTOCOL_ERROR;
+ }
+ catch(...)
+ {
+ }
+ }
+#else
if(dynamic_cast<const Ice::CloseConnectionException*>(&reason))
{
_closingReason = CLOSURE_NORMAL;
@@ -463,6 +499,7 @@ IceInternal::WSTransceiver::closing(bool initiator, const Ice::LocalException& r
{
_closingReason = CLOSURE_TOO_BIG;
}
+#endif
if(_state == StateOpened)
{