summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Incoming.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-08-08 15:22:27 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-08-08 15:22:27 +0200
commitb9e90a9c390c55244a65472ef93d01baefca8c4d (patch)
treead338ae8f6e79297ccf61b7523261e4680492474 /cpp/src/Ice/Incoming.cpp
parentMerge remote-tracking branch 'origin/encoding11' into mx (diff)
downloadice-b9e90a9c390c55244a65472ef93d01baefca8c4d.tar.bz2
ice-b9e90a9c390c55244a65472ef93d01baefca8c4d.tar.xz
ice-b9e90a9c390c55244a65472ef93d01baefca8c4d.zip
Fixes
Diffstat (limited to 'cpp/src/Ice/Incoming.cpp')
-rw-r--r--cpp/src/Ice/Incoming.cpp36
1 files changed, 35 insertions, 1 deletions
diff --git a/cpp/src/Ice/Incoming.cpp b/cpp/src/Ice/Incoming.cpp
index 3128a6f1f24..9c854ffb8dc 100644
--- a/cpp/src/Ice/Incoming.cpp
+++ b/cpp/src/Ice/Incoming.cpp
@@ -148,6 +148,11 @@ IncomingBase::__writeParamEncaps(const Byte* v, Ice::Int sz, bool ok)
void
IncomingBase::__writeUserException(const Ice::UserException& ex, Ice::FormatType format)
{
+ if(_observer)
+ {
+ _observer.failed(ex.ice_name());
+ }
+
::IceInternal::BasicStream* __os = __startWriteParams(format);
__os->write(ex);
__endWriteParams(false);
@@ -208,6 +213,11 @@ IceInternal::IncomingBase::__servantLocatorFinished()
{
assert(_connection);
+ if(_observer)
+ {
+ _observer.failed(ex.ice_name());
+ }
+
//
// The operation may have already marshaled a reply; we must overwrite that reply.
//
@@ -269,6 +279,11 @@ IceInternal::IncomingBase::__handleException(const std::exception& exc)
__warning(*rfe);
}
+ if(_observer)
+ {
+ _observer.failed(rfe->ice_name());
+ }
+
if(_response)
{
_os.b.resize(headerSize + 4); // Reply status position.
@@ -314,12 +329,16 @@ IceInternal::IncomingBase::__handleException(const std::exception& exc)
}
else if(const Exception* ex = dynamic_cast<const Exception*>(&exc))
{
-
if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0)
{
__warning(*ex);
}
+ if(_observer)
+ {
+ _observer.failed(ex->ice_name());
+ }
+
if(_response)
{
_os.b.resize(headerSize + 4); // Reply status position.
@@ -386,6 +405,11 @@ IceInternal::IncomingBase::__handleException(const std::exception& exc)
__warning(string("std::exception: ") + exc.what());
}
+ if(_observer)
+ {
+ _observer.failed(typeid(exc).name());
+ }
+
if(_response)
{
_os.b.resize(headerSize + 4); // Reply status position.
@@ -415,6 +439,11 @@ IceInternal::IncomingBase::__handleException()
assert(_connection);
+ if(_observer)
+ {
+ _observer.failed("unknown");
+ }
+
if(_response)
{
_os.b.resize(headerSize + 4); // Reply status position.
@@ -586,6 +615,11 @@ IceInternal::Incoming::invoke(const ServantManagerPtr& servantManager, BasicStre
{
Ice::EncodingVersion encoding = _is->skipEncaps(); // Required for batch requests.
+ if(_observer)
+ {
+ _observer.failed(ex.ice_name());
+ }
+
if(_response)
{
_os.write(replyUserException);