summaryrefslogtreecommitdiff
path: root/cpp/src/Glacier2/RequestQueue.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-05-24 03:20:43 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-05-24 03:20:43 +0000
commit0bd2a45a9fde9b179df836e6fc8b8bc3798b78d9 (patch)
treef40ab2ffc89981077a791089691632fa7cf3c25e /cpp/src/Glacier2/RequestQueue.cpp
parentForwarding a request now catches LocalException and forwards if necessary (diff)
downloadice-0bd2a45a9fde9b179df836e6fc8b8bc3798b78d9.tar.bz2
ice-0bd2a45a9fde9b179df836e6fc8b8bc3798b78d9.tar.xz
ice-0bd2a45a9fde9b179df836e6fc8b8bc3798b78d9.zip
move catch/ignore to the oneway block. AMI should not directly raise
LocalExceptions.
Diffstat (limited to 'cpp/src/Glacier2/RequestQueue.cpp')
-rw-r--r--cpp/src/Glacier2/RequestQueue.cpp28
1 files changed, 12 insertions, 16 deletions
diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp
index bc441129a08..004f2085555 100644
--- a/cpp/src/Glacier2/RequestQueue.cpp
+++ b/cpp/src/Glacier2/RequestQueue.cpp
@@ -76,22 +76,22 @@ Glacier2::Request::Request(const ObjectPrx& proxy, const ByteSeq& inParams, cons
void
Glacier2::Request::invoke()
{
- try
+ if(_proxy->ice_isTwoway())
{
- if(_proxy->ice_isTwoway())
+ AMI_Object_ice_invokePtr cb = new AMI_Object_ice_invokeI(_amdCB);
+ if(_forwardContext)
{
- 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);
- }
+ _proxy->ice_invoke_async(cb, _current.operation, _current.mode, _inParams, _current.ctx);
}
else
{
+ _proxy->ice_invoke_async(cb, _current.operation, _current.mode, _inParams);
+ }
+ }
+ else
+ {
+ try
+ {
ByteSeq outParams;
if(_forwardContext)
{
@@ -102,12 +102,8 @@ Glacier2::Request::invoke()
_proxy->ice_invoke(_current.operation, _current.mode, _inParams, outParams);
}
}
- }
- catch(const LocalException& ex)
- {
- if(_proxy->ice_isTwoway())
+ catch(const LocalException& ex)
{
- _amdCB->ice_exception(ex);
}
}
}