#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
HObject region,region2;
try{
MoveRegion(region,®ion2,0,10);
}
catch(HException &except)
{
qDebug()<<except.ProcName(); //实际的HALCON算子的名字
qDebug()<<except.ErrorMessage(); //错误文本
qDebug()<<except.ErrorCode(); //错误代码
//... ...
}
}
MainWindow::~MainWindow()
{
delete ui;
}
Halcon 算子异常处理(C++代码)
最新推荐文章于 2023-08-06 10:45:00 发布