void test_try()
{
cv::Mat img = cv::Mat::zeros(3, 3, CV_8UC1);
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
uchar a= img.at<uchar>(i, j);
}
}
std::vector<int>v;
v.push_back(1);
v.clear();
std::cout << "vv=" << v.at(2);
}
void test34()
{
try
{
test_try();
}
catch (const cv::Exception& e)
{
std::cout << "e.what() "<<e.what() << std::endl;
std::cout << "e.file " << e.file << std::endl;
std::cout << "e.code " << e.code << std::endl;
std::cout << "e.err " << e.err << std::endl;
std::cout << "e.line " << e.line << std::endl;
std::cout << "e.func " << e.func << std::endl;
std::cout << "e.msg " << e.msg << std::endl;
}
catch (const std::exception& e2)
{
std::cout << e2.what() << std::endl;
}
}