summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/InputStream.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-07-19 18:39:55 -0400
committerBernard Normier <bernard@zeroc.com>2016-07-19 18:39:55 -0400
commit09ff416d9060c022b63fe4a33dc7d995153a44ba (patch)
treed017c47d6be74fb45282c82bf5bd77953f737d8a /cpp/src/Ice/InputStream.cpp
parentMerge remote-tracking branch 'origin/3.6' (diff)
downloadice-09ff416d9060c022b63fe4a33dc7d995153a44ba.tar.bz2
ice-09ff416d9060c022b63fe4a33dc7d995153a44ba.tar.xz
ice-09ff416d9060c022b63fe4a33dc7d995153a44ba.zip
New UserExceptionFactory for C++11
Diffstat (limited to 'cpp/src/Ice/InputStream.cpp')
-rw-r--r--cpp/src/Ice/InputStream.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/cpp/src/Ice/InputStream.cpp b/cpp/src/Ice/InputStream.cpp
index 20bba90db7e..2e5dcdf2965 100644
--- a/cpp/src/Ice/InputStream.cpp
+++ b/cpp/src/Ice/InputStream.cpp
@@ -1403,7 +1403,7 @@ Ice::InputStream::readEnum(Int maxValue)
}
void
-Ice::InputStream::throwException(const UserExceptionFactoryPtr& factory)
+Ice::InputStream::throwException(ICE_IN(ICE_USER_EXCEPTION_FACTORY) factory)
{
initEncaps();
_currentEncaps->decoder->throwException(factory);
@@ -1963,7 +1963,7 @@ Ice::InputStream::EncapsDecoder10::read(PatchFunc patchFunc, void* patchAddr)
}
void
-Ice::InputStream::EncapsDecoder10::throwException(const UserExceptionFactoryPtr& factory)
+Ice::InputStream::EncapsDecoder10::throwException(ICE_IN(ICE_USER_EXCEPTION_FACTORY) factory)
{
assert(_sliceType == NoSlice);
@@ -1985,7 +1985,7 @@ Ice::InputStream::EncapsDecoder10::throwException(const UserExceptionFactoryPtr&
//
startSlice();
const string mostDerivedId = _typeId;
- UserExceptionFactoryPtr exceptionFactory = factory;
+ ICE_USER_EXCEPTION_FACTORY exceptionFactory = factory;
while(true)
{
//
@@ -2008,7 +2008,11 @@ Ice::InputStream::EncapsDecoder10::throwException(const UserExceptionFactoryPtr&
//
try
{
+#ifdef ICE_CPP11_MAPPING
+ exceptionFactory(_typeId);
+#else
exceptionFactory->createAndThrow(_typeId);
+#endif
}
catch(UserException& ex)
{
@@ -2265,7 +2269,7 @@ Ice::InputStream::EncapsDecoder11::read(PatchFunc patchFunc, void* patchAddr)
}
void
-Ice::InputStream::EncapsDecoder11::throwException(const UserExceptionFactoryPtr& factory)
+Ice::InputStream::EncapsDecoder11::throwException(ICE_IN(ICE_USER_EXCEPTION_FACTORY) factory)
{
assert(!_current);
@@ -2276,7 +2280,7 @@ Ice::InputStream::EncapsDecoder11::throwException(const UserExceptionFactoryPtr&
//
startSlice();
const string mostDerivedId = _current->typeId;
- UserExceptionFactoryPtr exceptionFactory = factory;
+ ICE_USER_EXCEPTION_FACTORY exceptionFactory = factory;
while(true)
{
//
@@ -2299,7 +2303,11 @@ Ice::InputStream::EncapsDecoder11::throwException(const UserExceptionFactoryPtr&
//
try
{
+#ifdef ICE_CPP11_MAPPING
+ exceptionFactory(_current->typeId);
+#else
exceptionFactory->createAndThrow(_current->typeId);
+#endif
}
catch(UserException& ex)
{