예제 #1
0
파일: OutgoingAsync.cpp 프로젝트: lmtoo/ice
bool
OutgoingAsyncBase::exceptionImpl(const Exception& ex)
{
    Lock sync(_m);
    ICE_SET_EXCEPTION_FROM_CLONE(_ex, ex.ice_clone());
    if(_childObserver)
    {
        _childObserver.failed(ex.ice_id());
        _childObserver.detach();
    }
    _cancellationHandler = 0;
    _observer.failed(ex.ice_id());

#ifndef ICE_CPP11_MAPPING
    _state |= Done;
    _m.notifyAll();
#endif

    bool invoke = handleException(ex);
    if(!invoke)
    {
        _observer.detach();
    }
    return invoke;
}
예제 #2
0
파일: OutgoingAsync.cpp 프로젝트: lmtoo/ice
bool
ProxyOutgoingAsyncBase::exception(const Exception& exc)
{
    if(_childObserver)
    {
        _childObserver.failed(exc.ice_id());
        _childObserver.detach();
    }

    _cachedConnection = 0;
    if(_proxy->__reference()->getInvocationTimeout() == -2)
    {
        _instance->timer()->cancel(ICE_SHARED_FROM_THIS);
    }

    //
    // NOTE: at this point, synchronization isn't needed, no other threads should be
    // calling on the callback.
    //
    try
    {
        //
        // It's important to let the retry queue do the retry even if
        // the retry interval is 0. This method can be called with the
        // connection locked so we can't just retry here.
        //
        _instance->retryQueue()->add(ICE_SHARED_FROM_THIS, _proxy->__handleException(exc, _handler, _mode, _sent, _cnt));
        return false;
    }
    catch(const Exception& ex)
    {
        return exceptionImpl(ex); // No retries, we're done
    }
}
예제 #3
0
파일: OutgoingAsync.cpp 프로젝트: lmtoo/ice
 virtual bool
 exception(const Exception& ex)
 {
     _childObserver.failed(ex.ice_id());
     _childObserver.detach();
     _outAsync->check(false);
     return false;
 }