本文整理汇总了C++中ErrorInfo::asString方法的典型用法代码示例。如果您正苦于以下问题:C++ ErrorInfo::asString方法的具体用法?C++ ErrorInfo::asString怎么用?C++ ErrorInfo::asString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ErrorInfo
的用法示例。
在下文中一共展示了ErrorInfo::asString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testLoadData
bool testLoadData(uima::util::ConsoleUI& rclConsole,
const char* cpszCCSID,
const TCHAR* cpszConfigFilename,
const TCHAR* cpszLanguage,
size_t uiNumOfIterations)
/* ----------------------------------------------------------------------- */
{
uima::TextAnalysisEngine* pEngine = NULL;
///uima::CCSID clCCSID(lCCSID);
uima::Language clLanguage(cpszLanguage);
ErrorInfo errInfo;
rclConsole.formatHeader(_TEXT("testing UIMA Engine loading a document"));
/* init engine */
pEngine = TextAnalysisEngine::createTextAnalysisEngine(cpszConfigFilename, errInfo);
uimaToolHandleErrorId(rclConsole, errInfo.getErrorId(), errInfo.asString().c_str(), _TEXT("uima::Engine::init()"),
gs_lExpectedInitRc);
if (gs_lExpectedInitRc != UIMA_ERR_NONE) {
return (false);
}
failIfNotTrue(pEngine != NULL);
for (size_t ui = 0; ui < uiNumOfIterations; ui++) {
const TCHAR* cpszInpTerm = 0;
/* read in file */
if (uiNumOfIterations > 1) {
rclConsole.newline();
rclConsole.format(_TEXT("Iteration"), (unsigned long) ui);
}
if (rclConsole.hasArgString(_TEXT("inpterm"), cpszInpTerm)) {
testProcessTerm(rclConsole, *pEngine, cpszCCSID, clLanguage, cpszInpTerm);
} else {
testProcessDocu(rclConsole, *pEngine, cpszCCSID, clLanguage);
}
}
TyErrorId utErrorId = pEngine->destroy();
uimaToolHandleErrorId(rclConsole, utErrorId, pEngine->getAnnotatorContext().getLogger().getLastErrorAsCStr(),
_TEXT("uima::Engine::deInit"));
delete pEngine;
return (true);
}