本文整理汇总了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();
}
示例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);
}
}
示例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();
}
示例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);
}
}
}
示例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();
}
示例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;
}