diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-08-30 16:49:10 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-08-30 16:49:10 +0200 |
commit | 1677a25a118d6abbdd05d708338c02a59e9a8f0d (patch) | |
tree | 285df5b631d77ac16e5a66d0176bd20af1562dc7 /objective-c/src | |
parent | Added cygwin support for icehashpassword.py (diff) | |
download | ice-1677a25a118d6abbdd05d708338c02a59e9a8f0d.tar.bz2 ice-1677a25a118d6abbdd05d708338c02a59e9a8f0d.tar.xz ice-1677a25a118d6abbdd05d708338c02a59e9a8f0d.zip |
Fixed minor bug with client side user exception check that would occur with 1.0 encoding
Diffstat (limited to 'objective-c/src')
-rw-r--r-- | objective-c/src/Ice/Proxy.mm | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/objective-c/src/Ice/Proxy.mm b/objective-c/src/Ice/Proxy.mm index 173a09638bd..2a797da129a 100644 --- a/objective-c/src/Ice/Proxy.mm +++ b/objective-c/src/Ice/Proxy.mm @@ -90,15 +90,18 @@ void completed(const Ice::AsyncResultPtr& result) else { Ice::InputStreamPtr s = Ice::createInputStream(proxy->ice_getCommunicator(), outParams); - try + is = [ICEInputStream localObjectWithCxxObjectNoAutoRelease:s.get()]; + @try { - s->startEncapsulation(); - s->throwException(); + [is startEncapsulation]; + [is throwException]; } - catch(const Ice::UserException& ex) + @catch(ICEUserException* ex) { - s->endEncapsulation(); - throw Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_name()); + [is endEncapsulation]; + [is release]; + is = nil; + nsex = [ICEUnknownUserException unknownUserException:__FILE__ line:__LINE__ unknown:[ex ice_name]]; } } } @@ -550,15 +553,18 @@ BOOL _returnsData; else { Ice::InputStreamPtr s = Ice::createInputStream(OBJECTPRX->ice_getCommunicator(), outParams); - try + is = [ICEInputStream localObjectWithCxxObjectNoAutoRelease:s.get()]; + @try { - s->startEncapsulation(); - s->throwException(); + [is startEncapsulation]; + [is throwException]; } - catch(const Ice::UserException& ex) + @catch(ICEUserException* ex) { - s->endEncapsulation(); - throw Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_name()); + [is endEncapsulation]; + [is release]; + is = nil; + nsex = [ICEUnknownUserException unknownUserException:__FILE__ line:__LINE__ unknown:[ex ice_name]]; } } } @@ -863,15 +869,18 @@ BOOL _returnsData; else { Ice::InputStreamPtr s = Ice::createInputStream(OBJECTPRX->ice_getCommunicator(), outParams); - try + is = [ICEInputStream localObjectWithCxxObjectNoAutoRelease:s.get()]; + @try { - s->startEncapsulation(); - s->throwException(); + [is startEncapsulation]; + [is throwException]; } - catch(const Ice::UserException& ex) + @catch(ICEUserException* ex) { - s->endEncapsulation(); - throw Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_name()); + [is endEncapsulation]; + [is release]; + is = nil; + nsex = [ICEUnknownUserException unknownUserException:__FILE__ line:__LINE__ unknown:[ex ice_name]]; } } } |