diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-10-10 16:00:58 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-10-10 16:00:58 +0200 |
commit | 8bcfc9e4a8a1de3d72e30ffc6f3c9d72a8d3f0e4 (patch) | |
tree | 1cdcd88fccb57f88d2b47cd1757b4d43bc05be4b /cpp/src/Ice/Outgoing.cpp | |
parent | Added IceGridGUI IceStorm metrics (diff) | |
download | ice-8bcfc9e4a8a1de3d72e30ffc6f3c9d72a8d3f0e4.tar.bz2 ice-8bcfc9e4a8a1de3d72e30ffc6f3c9d72a8d3f0e4.tar.xz ice-8bcfc9e4a8a1de3d72e30ffc6f3c9d72a8d3f0e4.zip |
Improved tracing of failures, user exceptions are now tracked
with a userException member.
Diffstat (limited to 'cpp/src/Ice/Outgoing.cpp')
-rw-r--r-- | cpp/src/Ice/Outgoing.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index 53e50da60d1..e02e28063a4 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -387,6 +387,7 @@ IceInternal::Outgoing::finished(BasicStream& is) case replyUserException: { + _observer.userException(); _state = StateUserException; // The state must be set last, in case there is an exception. break; } @@ -523,6 +524,7 @@ IceInternal::Outgoing::finished(const LocalException& ex, bool sent) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); assert(_state <= StateInProgress); + _remoteObserver.failed(ex.ice_name()); _remoteObserver.detach(); _state = StateFailed; @@ -539,12 +541,8 @@ IceInternal::Outgoing::throwUserException() _is.startReadEncaps(); _is.throwException(); } - catch(const Ice::UserException& ex) + catch(const Ice::UserException&) { - if(_observer) - { - _observer.failed(ex.ice_name()); - } _is.endReadEncaps(); throw; } @@ -579,7 +577,6 @@ IceInternal::BatchOutgoing::invoke() { _monitor.wait(); } - _remoteObserver.detach(); if(_exception.get()) { _exception->ice_throw(); @@ -600,12 +597,15 @@ IceInternal::BatchOutgoing::sent(bool notify) { _sent = true; } + _remoteObserver.detach(); } void IceInternal::BatchOutgoing::finished(const Ice::LocalException& ex, bool) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor); + _remoteObserver.failed(ex.ice_name()); + _remoteObserver.detach(); _exception.reset(ex.ice_clone()); _monitor.notify(); } |