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


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

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


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

示例1: FatalException

void FatalException(Exception &e, std::string const &location) {
    DataError *pDataError = dynamic_cast<DataError*> (&e);
    CSPLOG(ERROR, APP) << "CSPSim: caught exception in " << location << ": " << e.getMessage();
    std::cerr << "\n";
    e.details();
    std::cerr << "\n";
    if (pDataError) {
        std::cerr
                << "Please check that the data paths in CSPSim.ini are set to reasonable\n"
                << "values (CSPSim.ini is usually found in CSPSim/Data).  If you appear\n"
                << "to be missing a necessary data file, please check the CSP download\n"
                << "page for the latest data releases or ask for assistance on the CSP\n"
                << "forums:\n"
                << "                http://csp.sourceforge.net/forum\n";
    }
    else {
        std::cerr
                << "CSPSim: caught an exception.  Please report this along with\n"
                << "as much information as possible about what was happening at \n"
                << "the time of the error to the CSP forum at\n"
                << "              http://csp.sourceforge.net/forum\n";
    }
    std::cerr << std::endl;
    ::exit(1);
}
开发者ID:nsmoooose,项目名称:csp,代码行数:25,代码来源:Exception.cpp

示例2: throw

Message::Message(const Exception& e, DistributionRealm realm, 
		 PayloadSignificance sig, bool highlight) throw():
  m_hostname(s_this_hostname), m_origin(MO_LOCAL), m_zone(-1),
  m_program(s_this_program), m_title(e.title()), m_realm(realm), 
  m_significance(sig), m_message_oss(e.message()), m_details_oss(e.details()), 
  m_function(e.function(highlight)), m_time()
{
  m_time.tv_sec=e.time().tv_sec;
  m_time.tv_usec=e.time().tv_usec;
}
开发者ID:sfegan,项目名称:serial_tracking,代码行数:10,代码来源:Message.cpp


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