在此简单记录一下halcon中try catch的使用
halcon已经将一些函数的catch定义完成,我们仅需要合理的打印出来即可:
try
{
HalconCpp::ReadImage(&textImage, "ooo.jpg");
}
catch (HalconCpp::HException& exception)
{
std::cout << (const char*)(exception.ErrorMessage()) << std::endl;
return;
}