本文整理汇总了C++中ice::Exception::ice_throw方法的典型用法代码示例。如果您正苦于以下问题:C++ Exception::ice_throw方法的具体用法?C++ Exception::ice_throw怎么用?C++ Exception::ice_throw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ice::Exception
的用法示例。
在下文中一共展示了Exception::ice_throw方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: out
void
exception(const Ice::Exception& ex)
{
try
{
ex.ice_throw();
}
catch(const DeploymentException& ex)
{
if(_traceLevels && _traceLevels->server > 1)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->serverCat);
out << "couldn't unload `" << _id << "' on node `" << _node << "':\n" << ex.reason;
}
ostringstream os;
os << "couldn't unload `" << _id << "' on node `" << _node << "':\n" << ex.reason;
_server->exception(DeploymentException(os.str()));
}
catch(const Ice::Exception& ex)
{
if(_traceLevels && _traceLevels->server > 1)
{
Ice::Trace out(_traceLevels->logger, _traceLevels->serverCat);
out << "couldn't unload `" << _id << "' on node `" << _node << "':\n" << ex;
}
ostringstream os;
os << ex;
_server->exception(NodeUnreachableException(_node, os.str()));
}
}
示例2: catch
string
IceGrid::toString(const Ice::Exception& exception)
{
std::ostringstream os;
try
{
exception.ice_throw();
}
catch(const NodeUnreachableException& ex)
{
os << ex << ":";
os << "\nnode: " << ex.name;
os << "\nreason: " << ex.reason;
}
catch(const DeploymentException& ex)
{
os << ex << ":";
os << "\nreason: " << ex.reason;
}
catch(const Ice::Exception& ex)
{
os << ex;
}
return os.str();
}
示例3: catch
void
LambdaInvoke::handleInvokeException(const Ice::Exception& ex, OutgoingAsyncBase*) const
{
try
{
ex.ice_throw();
}
catch(const Ice::Exception&)
{
_exception(current_exception());
}
}
示例4: catch
void
Parser::exception(const Ice::Exception& ex, bool warn)
{
ostringstream os;
try
{
ex.ice_throw();
}
catch(const LinkExists& ex)
{
os << "link `" << ex.name << "' already exists";
}
catch(const NoSuchLink& ex)
{
os << "couldn't find link `" << ex.name << "'";
}
catch(const TopicExists& ex)
{
os << "topic `" << ex.name << "' exists";
}
catch(const NoSuchTopic& ex)
{
os << "couldn't find topic `" << ex.name << "'";
}
catch(const UnknownManagerException& ex)
{
os << "couldn't find IceStorm service `" << ex.name << "'";
}
catch(const IdentityParseException& ex)
{
os << "invalid identity `" << ex.str << "'";
}
catch(const Ice::LocalException& ex)
{
os << "couldn't reach IceStorm service:\n" << ex;
}
catch(const Ice::Exception& ex)
{
os << ex;
}
if(warn)
{
warning(os.str());
}
else
{
error(os.str());
}
}
示例5: exception_UndeclaredC
virtual void exception_UndeclaredC(const Ice::Exception& exc)
{
try
{
exc.ice_throw();
}
catch(const Ice::UnknownUserException&)
{
}
catch(...)
{
test(false);
}
called();
}
示例6: exception_NonIceException
virtual void exception_NonIceException(const Ice::Exception& exc)
{
try
{
exc.ice_throw();
}
catch(const Ice::UnknownException&)
{
}
catch(...)
{
test(false);
}
called();
}
示例7: catch
void
CreateSession::createException(const Ice::Exception& ex)
{
try
{
ex.ice_throw();
}
catch(const CannotCreateSessionException& ex)
{
exception(ex);
}
catch(const Ice::Exception& ex)
{
unexpectedCreateSessionException(ex);
}
}
示例8: exception_AasAFacetNotExist
virtual void exception_AasAFacetNotExist(const Ice::Exception& exc)
{
try
{
exc.ice_throw();
}
catch(const Ice::FacetNotExistException& ex)
{
test(ex.facet == "no such facet");
}
catch(...)
{
test(false);
}
called();
}
示例9: exception_noSuchOperation
virtual void exception_noSuchOperation(const Ice::Exception& exc)
{
try
{
exc.ice_throw();
}
catch(const Ice::OperationNotExistException& ex)
{
test(ex.operation == "noSuchOperation");
}
catch(...)
{
test(false);
}
called();
}
示例10: exception_AasAObjectNotExist
virtual void exception_AasAObjectNotExist(const Ice::Exception& exc)
{
try
{
exc.ice_throw();
}
catch(const Ice::ObjectNotExistException& ex)
{
Ice::Identity id = _communicator->stringToIdentity("does not exist");
test(ex.id == id);
}
catch(...)
{
test(false);
}
called();
}
示例11: exception_BasA
virtual void exception_BasA(const Ice::Exception& exc)
{
try
{
exc.ice_throw();
}
catch(const B& ex)
{
test(ex.aMem == 1);
test(ex.bMem == 2);
}
catch(...)
{
test(false);
}
called();
}
示例12: exception_LocalException
virtual void exception_LocalException(const Ice::Exception& exc)
{
try
{
exc.ice_throw();
}
catch(const Ice::UnknownLocalException&)
{
}
catch(const Ice::OperationNotExistException&)
{
}
catch(...)
{
test(false);
}
called();
}
示例13: catch
void
exception_unknownDerivedAsBase(const Ice::Exception& exc)
{
try
{
exc.ice_throw();
}
catch(const Base& b)
{
test(b.b == "UnknownDerived.b");
test(b.ice_id() == "::Test::Base");
}
catch(...)
{
test(false);
}
called();
}
示例14: exceptAbortI
void exceptAbortI(const Ice::Exception& ex)
{
try
{
ex.ice_throw();
}
catch(const Ice::ConnectionLostException&)
{
}
catch(const Ice::ConnectFailedException&)
{
}
catch(const Ice::Exception& ex)
{
cout << ex << endl;
test(false);
}
called();
}
示例15: if
void
ProxyOutgoingAsyncBase::abort(const Ice::Exception& ex)
{
assert(!_childObserver);
if(finished(ex))
{
invokeCompletedAsync();
}
else if(dynamic_cast<const Ice::CommunicatorDestroyedException*>(&ex))
{
//
// If it's a communicator destroyed exception, don't swallow
// it but instead notify the user thread. Even if no callback
// was provided.
//
ex.ice_throw();
}
}