当前位置: 首页>>代码示例>>C++>>正文


C++ Exception::ice_clone方法代码示例

本文整理汇总了C++中ice::Exception::ice_clone方法的典型用法代码示例。如果您正苦于以下问题:C++ Exception::ice_clone方法的具体用法?C++ Exception::ice_clone怎么用?C++ Exception::ice_clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ice::Exception的用法示例。


在下文中一共展示了Exception::ice_clone方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sync

void
Outgoing::completed(const Ice::Exception& ex)
{
    Monitor<Mutex>::Lock sync(_monitor);
    //assert(_state <= StateInProgress);
    if(_state > StateInProgress)
    {
        //
        // Response was already received but message
        // didn't get removed first from the connection
        // send message queue so it's possible we can be
        // notified of failures. In this case, ignore the
        // failure and assume the outgoing has been sent.
        //
        assert(_state != StateFailed);
        _sent = true;
        _monitor.notify();
        return;
    }

    _childObserver.failed(ex.ice_name());
    _childObserver.detach();

    _state = StateFailed;
    _exception.reset(ex.ice_clone());
    _monitor.notify();
}
开发者ID:pedia,项目名称:zeroc-ice,代码行数:27,代码来源:Outgoing.cpp

示例2: sync

    void
    synchronized(const Ice::Exception& ex)
    {
        SynchronizationCallbackPtr callback;
        {
            Lock sync(*this);
            if(!_exception.get())
            {
                _exception.reset(ex.ice_clone());
            }
            
            --_synchronizeCount;
            if(!_responseCalled)
            {
                return;
            }

            if(_synchronizeCount > 0)
            {
                return;
            }

            callback = _callback;
            _callback = 0;
        }

        if(callback)
        {
            callback->synchronized(ex);
        }
    }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:31,代码来源:AdapterCache.cpp

示例3: sync

void
ConnectionFlushBatch::completed(const Ice::Exception& ex)
{
    Monitor<Mutex>::Lock sync(_monitor);
    _childObserver.failed(ex.ice_id());
    _childObserver.detach();
    ICE_RESET_EXCEPTION(_exception, ex.ice_clone());
    _monitor.notify();
}
开发者ID:465060874,项目名称:ice,代码行数:9,代码来源:Outgoing.cpp

示例4: sync

void
ServerEntry::exception(const Ice::Exception& ex)
{
    ServerInfo load;
    SessionIPtr session;
    bool noRestart = false;
    bool remove = false;
    int timeout = -1;

    {
        Lock sync(*this);
        if((_destroy.get() && !_load.get()) || (!_destroy.get() && !_updated))
        {
            remove = _destroy.get();
            _destroy.reset(0);
            _exception.reset(ex.ice_clone());
            _proxy = 0;
            _adapters.clear();
            _activationTimeout = -1;
            _deactivationTimeout = -1;
            _synchronizing = false;
            notifyAll();
        }
        else
        {
            _destroy.reset(0);
            _updated = false;
            load = *_load.get();
            noRestart = _noRestart;
            session = _session;
            timeout = _deactivationTimeout; // loadServer might block to deactivate the previous server.
        }
    }

    if(load.descriptor)
    {
        try
        {
            _cache.getNodeCache().get(load.node)->loadServer(this, load, session, timeout, noRestart);
        }
        catch(const NodeNotExistException&)
        {
            exception(NodeUnreachableException(load.node, "node is not active"));
        }
    }
    else
    {
        synchronized(ex);
        if(remove)
        {
            _cache.clear(_id);
        }
    }
}
开发者ID:ming-hai,项目名称:ice,代码行数:54,代码来源:ServerCache.cpp

示例5: sync

void 
IceInternal::LocatorInfo::Request::exception(const Ice::Exception& ex)
{
    IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor);
    _locatorInfo->finishRequest(_ref, _wellKnownRefs, 0, dynamic_cast<const Ice::UserException*>(&ex));
    _exception.reset(ex.ice_clone());
    for(vector<RequestCallbackPtr>::const_iterator p = _callbacks.begin(); p != _callbacks.end(); ++p)
    {
        (*p)->exception(_locatorInfo, ex);
    }
    _monitor.notifyAll();
}
开发者ID:Jonavin,项目名称:ice,代码行数:12,代码来源:LocatorInfo.cpp

示例6: sync

bool
AsyncResult::finished(const Ice::Exception& ex)
{
    IceUtil::Monitor<IceUtil::Mutex>::Lock sync(_monitor);
    _state |= Done;
    _exception.reset(ex.ice_clone());
    _cancellationHandler = 0;
    _observer.failed(ex.ice_name());
    if(!_callback)
    {
        _observer.detach();
    }
    _monitor.notifyAll();
    return _callback;
}
开发者ID:Jonavin,项目名称:ice,代码行数:15,代码来源:AsyncResult.cpp


注:本文中的ice::Exception::ice_clone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。