diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-05-24 02:30:56 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-05-24 02:30:56 +0000 |
commit | 1e25c3aac5e40a671b7fe19b248a5d5e180b2c5d (patch) | |
tree | 52fa8cd135f6d5ef50f874de7ad391db47acff43 /cpp/src | |
parent | do not generate OBV methods (diff) | |
download | ice-1e25c3aac5e40a671b7fe19b248a5d5e180b2c5d.tar.bz2 ice-1e25c3aac5e40a671b7fe19b248a5d5e180b2c5d.tar.xz ice-1e25c3aac5e40a671b7fe19b248a5d5e180b2c5d.zip |
Forwarding a request now catches LocalException and forwards if necessary
again.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Glacier2/RequestQueue.cpp | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp index 1cd0965feaf..bc441129a08 100644 --- a/cpp/src/Glacier2/RequestQueue.cpp +++ b/cpp/src/Glacier2/RequestQueue.cpp @@ -76,28 +76,38 @@ Glacier2::Request::Request(const ObjectPrx& proxy, const ByteSeq& inParams, cons void Glacier2::Request::invoke() { - if(_proxy->ice_isTwoway()) + try { - AMI_Object_ice_invokePtr cb = new AMI_Object_ice_invokeI(_amdCB); - if(_forwardContext) + if(_proxy->ice_isTwoway()) { - _proxy->ice_invoke_async(cb, _current.operation, _current.mode, _inParams, _current.ctx); + AMI_Object_ice_invokePtr cb = new AMI_Object_ice_invokeI(_amdCB); + if(_forwardContext) + { + _proxy->ice_invoke_async(cb, _current.operation, _current.mode, _inParams, _current.ctx); + } + else + { + _proxy->ice_invoke_async(cb, _current.operation, _current.mode, _inParams); + } } else { - _proxy->ice_invoke_async(cb, _current.operation, _current.mode, _inParams); + ByteSeq outParams; + if(_forwardContext) + { + _proxy->ice_invoke(_current.operation, _current.mode, _inParams, outParams, _current.ctx); + } + else + { + _proxy->ice_invoke(_current.operation, _current.mode, _inParams, outParams); + } } } - else + catch(const LocalException& ex) { - ByteSeq outParams; - if(_forwardContext) - { - _proxy->ice_invoke(_current.operation, _current.mode, _inParams, outParams, _current.ctx); - } - else + if(_proxy->ice_isTwoway()) { - _proxy->ice_invoke(_current.operation, _current.mode, _inParams, outParams); + _amdCB->ice_exception(ex); } } } |