【发布时间】:2012-10-02 12:33:59
【问题描述】:
我已经编写了这段代码来捕获 ppl 启动的错误
try
{
parallel_for (m_row_start, m_row_end + 1, [&functionEvaluation,varModel_,this](int i)
{
// do things
});
}
catch(const std::exception error_)
{
QString t(error_.what());
}
try
{
return functionEvaluation.combine(plus<double>());
}
catch(const std::exception error_)
{
QString t(error_.what());
}
虽然我强烈怀疑它确实引发了异常,但没有发现任何错误(更大的try{}catch(...){} 它捕获了std::exception,没有明确的消息。
我对捕获 ppl 代码中引发的异常的语法是否正确?
【问题讨论】:
标签: c++ exception parallel-processing try-catch ppl