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