diff options
author | Mark Spruiell <mes@zeroc.com> | 2005-07-22 00:08:23 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2005-07-22 00:08:23 +0000 |
commit | 9e2defe6ae79f3f68b7db98ab12257aceb4eb4dc (patch) | |
tree | 14ac45ba11b59d3c3d1aee24b864fc7db801cc5e /cppe/src | |
parent | removed __usesClasses from UserException (diff) | |
download | ice-9e2defe6ae79f3f68b7db98ab12257aceb4eb4dc.tar.bz2 ice-9e2defe6ae79f3f68b7db98ab12257aceb4eb4dc.tar.xz ice-9e2defe6ae79f3f68b7db98ab12257aceb4eb4dc.zip |
more fixes for bug 421
Diffstat (limited to 'cppe/src')
-rw-r--r-- | cppe/src/IceE/Proxy.cpp | 68 |
1 files changed, 49 insertions, 19 deletions
diff --git a/cppe/src/IceE/Proxy.cpp b/cppe/src/IceE/Proxy.cpp index beb42bf9226..5cbe885fcb3 100644 --- a/cppe/src/IceE/Proxy.cpp +++ b/cppe/src/IceE/Proxy.cpp @@ -710,20 +710,31 @@ bool IceDelegate::Ice::Object::ice_isA(const string& __id, const Context& __context) { static const string __operation("ice_isA"); - Outgoing __outS(__connection.get(), __reference.get(), __operation, ::Ice::Nonmutating, __context); - BasicStream* __is = __outS.is(); - BasicStream* __os = __outS.os(); - __os->write(__id); + Outgoing __og(__connection.get(), __reference.get(), __operation, ::Ice::Nonmutating, __context); + try + { + BasicStream* __os = __og.os(); + __os->write(__id); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } bool __ret; - bool __ok = __outS.invoke(); + bool __ok = __og.invoke(); try { + BasicStream* __is = __og.is(); if(!__ok) { __is->throwException(); } __is->read(__ret); } + catch(const ::Ice::UserException& __ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__); + } catch(const ::Ice::LocalException& __ex) { throw ::IceInternal::NonRepeatable(__ex); @@ -735,16 +746,20 @@ void IceDelegate::Ice::Object::ice_ping(const Context& __context) { static const string __operation("ice_ping"); - Outgoing __outS(__connection.get(), __reference.get(), __operation, ::Ice::Nonmutating, __context); - BasicStream* __is = __outS.is(); - bool __ok = __outS.invoke(); + Outgoing __og(__connection.get(), __reference.get(), __operation, ::Ice::Nonmutating, __context); + bool __ok = __og.invoke(); try { + BasicStream* __is = __og.is(); if(!__ok) { __is->throwException(); } } + catch(const ::Ice::UserException& __ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__); + } catch(const ::Ice::LocalException& __ex) { throw ::IceInternal::NonRepeatable(__ex); @@ -755,18 +770,22 @@ vector<string> IceDelegate::Ice::Object::ice_ids(const Context& __context) { static const string __operation("ice_ids"); - Outgoing __outS(__connection.get(), __reference.get(), __operation, ::Ice::Nonmutating, __context); - BasicStream* __is = __outS.is(); + Outgoing __og(__connection.get(), __reference.get(), __operation, ::Ice::Nonmutating, __context); vector<string> __ret; - bool __ok = __outS.invoke(); + bool __ok = __og.invoke(); try { + BasicStream* __is = __og.is(); if(!__ok) { __is->throwException(); } __is->read(__ret); } + catch(const ::Ice::UserException& __ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__); + } catch(const ::Ice::LocalException& __ex) { throw ::IceInternal::NonRepeatable(__ex); @@ -778,18 +797,22 @@ string IceDelegate::Ice::Object::ice_id(const Context& __context) { static const string __operation("ice_id"); - Outgoing __outS(__connection.get(), __reference.get(), __operation, ::Ice::Nonmutating, __context); - BasicStream* __is = __outS.is(); + Outgoing __og(__connection.get(), __reference.get(), __operation, ::Ice::Nonmutating, __context); string __ret; - bool __ok = __outS.invoke(); + bool __ok = __og.invoke(); try { + BasicStream* __is = __og.is(); if(!__ok) { __is->throwException(); } __is->read(__ret); } + catch(const ::Ice::UserException& __ex) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__); + } catch(const ::Ice::LocalException& __ex) { throw ::IceInternal::NonRepeatable(__ex); @@ -805,15 +828,22 @@ IceDelegate::Ice::Object::ice_invoke(const string& operation, vector<Byte>& outParams, const Context& context) { - Outgoing __outS(__connection.get(), __reference.get(), operation, mode, context); - BasicStream* __os = __outS.os(); - __os->writeBlob(inParams); - bool ok = __outS.invoke(); + Outgoing __og(__connection.get(), __reference.get(), operation, mode, context); + try + { + BasicStream* __os = __og.os(); + __os->writeBlob(inParams); + } + catch(const ::Ice::LocalException& __ex) + { + __og.abort(__ex); + } + bool ok = __og.invoke(); if(__reference->getMode() == Reference::ModeTwoway) { try { - BasicStream* __is = __outS.is(); + BasicStream* __is = __og.is(); Int sz = __is->getReadEncapsSize(); __is->readBlob(outParams, sz); } |