summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/IncomingAsync.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2010-05-21 14:03:30 -0700
committerMark Spruiell <mes@zeroc.com>2010-05-21 14:03:30 -0700
commit01e3d1af5c5e19d74d391a8998495df59f6c4ce8 (patch)
treea94485661f2eb28ce4b1cb29fabf34c3fddf7c8d /cpp/src/Ice/IncomingAsync.cpp
parentVarious changes for 3.4.1 installers (diff)
downloadice-01e3d1af5c5e19d74d391a8998495df59f6c4ce8.tar.bz2
ice-01e3d1af5c5e19d74d391a8998495df59f6c4ce8.tar.xz
ice-01e3d1af5c5e19d74d391a8998495df59f6c4ce8.zip
bug 4733 - fixing bugs in AMD exceptions
Diffstat (limited to 'cpp/src/Ice/IncomingAsync.cpp')
-rw-r--r--cpp/src/Ice/IncomingAsync.cpp35
1 files changed, 32 insertions, 3 deletions
diff --git a/cpp/src/Ice/IncomingAsync.cpp b/cpp/src/Ice/IncomingAsync.cpp
index fa67937d0d0..124bd5553b5 100644
--- a/cpp/src/Ice/IncomingAsync.cpp
+++ b/cpp/src/Ice/IncomingAsync.cpp
@@ -119,7 +119,20 @@ IceInternal::IncomingAsync::ice_exception(const ::std::exception& ex)
_active = false;
}
- __exception(ex);
+ if(_connection)
+ {
+ __exception(ex);
+ }
+ else
+ {
+ //
+ // Response has already been sent.
+ //
+ if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
+ {
+ __warning(ex.what());
+ }
+ }
}
void
@@ -157,7 +170,20 @@ IceInternal::IncomingAsync::ice_exception()
_active = false;
}
- __exception();
+ if(_connection)
+ {
+ __exception();
+ }
+ else
+ {
+ //
+ // Response has already been sent.
+ //
+ if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
+ {
+ __warning("unknown exception");
+ }
+ }
}
void
@@ -170,6 +196,8 @@ IceInternal::IncomingAsync::__response(bool ok)
return;
}
+ assert(_connection);
+
if(_response)
{
_os.endWriteEncaps();
@@ -189,6 +217,8 @@ IceInternal::IncomingAsync::__response(bool ok)
{
_connection->sendNoResponse();
}
+
+ _connection = 0;
}
catch(const LocalException& ex)
{
@@ -310,4 +340,3 @@ IceAsync::Ice::AMD_Object_ice_invoke::ice_response(bool ok, const pair<const Byt
__response(ok);
}
}
-