diff options
author | Jose <jose@zeroc.com> | 2016-01-11 17:21:46 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-01-11 17:21:46 +0100 |
commit | 6fece3700ac31712b6d8892108a17e01cb2614be (patch) | |
tree | 9cdcfed91e78c9bd226881ee594f58a09fba38a6 /cpp/src/Ice/Outgoing.cpp | |
parent | Fix Ice/location test failures with C++11 (diff) | |
download | ice-6fece3700ac31712b6d8892108a17e01cb2614be.tar.bz2 ice-6fece3700ac31712b6d8892108a17e01cb2614be.tar.xz ice-6fece3700ac31712b6d8892108a17e01cb2614be.zip |
Add ICE_RESET_EXCEPTION macro to simplify C++ builds
Diffstat (limited to 'cpp/src/Ice/Outgoing.cpp')
-rw-r--r-- | cpp/src/Ice/Outgoing.cpp | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index d3291ff1ddf..2a12baf84d9 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -86,11 +86,7 @@ ProxyOutgoingBase::completed(const Ice::Exception& ex) _childObserver.detach(); _state = StateFailed; -#ifdef ICE_CPP11_MAPPING - _exception = ex.ice_clone(); -#else - _exception.reset(ex.ice_clone()); -#endif + ICE_RESET_EXCEPTION(_exception, ex.ice_clone()); _monitor.notify(); } @@ -126,11 +122,7 @@ ProxyOutgoingBase::invokeImpl() } _state = StateInProgress; -#ifdef ICE_CPP11_MAPPING - _exception = nullptr; -#else - _exception.reset(0); -#endif + ICE_RESET_EXCEPTION(_exception, ICE_NULLPTR); _sent = false; _handler = _proxy->__getRequestHandler(); @@ -509,12 +501,7 @@ Outgoing::completed(BasicStream& is) ex->id = ident; ex->facet = facet; ex->operation = operation; -#ifdef ICE_CPP11_MAPPING - _exception = ex->ice_clone(); -#else - _exception.reset(ex); -#endif - + ICE_RESET_EXCEPTION(_exception, ex->ice_clone()); _state = StateLocalException; // The state must be set last, in case there is an exception. break; } @@ -561,11 +548,7 @@ Outgoing::completed(BasicStream& is) } ex->unknown = unknown; -#ifdef ICE_CPP11_MAPPING - _exception = ex->ice_clone(); -#else - _exception.reset(ex); -#endif + ICE_RESET_EXCEPTION(_exception, ex->ice_clone()); _state = StateLocalException; // The state must be set last, in case there is an exception. break; } @@ -699,11 +682,7 @@ ConnectionFlushBatch::completed(const Ice::Exception& ex) Monitor<Mutex>::Lock sync(_monitor); _childObserver.failed(ex.ice_name()); _childObserver.detach(); -#ifdef ICE_CPP11_MAPPING - _exception = ex.ice_clone(); -#else - _exception.reset(ex.ice_clone()); -#endif + ICE_RESET_EXCEPTION(_exception, ex.ice_clone()); _monitor.notify(); } |