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


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

本文整理汇总了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()));
        }
    }
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:31,代码来源:NodeCache.cpp

示例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();
}
开发者ID:2008hatake,项目名称:zeroc-ice,代码行数:25,代码来源:Util.cpp

示例3: catch

void
LambdaInvoke::handleInvokeException(const Ice::Exception& ex, OutgoingAsyncBase*) const
{
    try
    {
        ex.ice_throw();
    }
    catch(const Ice::Exception&)
    {
        _exception(current_exception());
    }
}
开发者ID:lmtoo,项目名称:ice,代码行数:12,代码来源:OutgoingAsync.cpp

示例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());
    }
}
开发者ID:pedia,项目名称:zeroc-ice,代码行数:50,代码来源:Parser.cpp

示例5: exception_UndeclaredC

 virtual void exception_UndeclaredC(const Ice::Exception& exc)
 {
     try
     {
         exc.ice_throw();
     }
     catch(const Ice::UnknownUserException&)
     {
     }
     catch(...)
     {
         test(false);
     }
     called();
 }
开发者ID:Jonavin,项目名称:ice,代码行数:15,代码来源:AllTests.cpp

示例6: exception_NonIceException

 virtual void exception_NonIceException(const Ice::Exception& exc)
 {
     try
     {
         exc.ice_throw();
     }
     catch(const Ice::UnknownException&)
     {
     }
     catch(...)
     {
         test(false);
     }
     called();
 }
开发者ID:Jonavin,项目名称:ice,代码行数:15,代码来源:AllTests.cpp

示例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);
    }
}
开发者ID:yuanbaopapa,项目名称:ice,代码行数:16,代码来源:SessionRouterI.cpp

示例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();
 }
开发者ID:Jonavin,项目名称:ice,代码行数:16,代码来源:AllTests.cpp

示例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();
 }
开发者ID:Jonavin,项目名称:ice,代码行数:16,代码来源:AllTests.cpp

示例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();
 }
开发者ID:Jonavin,项目名称:ice,代码行数:17,代码来源:AllTests.cpp

示例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();
 }
开发者ID:Jonavin,项目名称:ice,代码行数:17,代码来源:AllTests.cpp

示例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();
 }
开发者ID:Jonavin,项目名称:ice,代码行数:18,代码来源:AllTests.cpp

示例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();
 }
开发者ID:chenbk85,项目名称:ice,代码行数:18,代码来源:AllTests.cpp

示例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();
 }
开发者ID:pedia,项目名称:zeroc-ice,代码行数:19,代码来源:AllTests.cpp

示例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();
    }
}
开发者ID:pedia,项目名称:zeroc-ice,代码行数:19,代码来源:OutgoingAsync.cpp


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