You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.7 KiB

/*
//定义整个系统基础的 定义 信息
*/
#ifndef Define_Error_H_
#define Define_Error_H_
#include <string>
using namespace std;
enum ERRORCODEDEFINE
{
CHECK_OK,
CHECK_ERROR_VERSION, // 参数或接口版本问题
CHECK_ERROR_Config_Null, // 参数指针为空
CHECK_ERROR_Config_Value, // 参数值错误
CHECK_ERROR_Path_NULL, // 路径为空
CHECK_ERROR_Mask_Empty, // mask 图片为空
CHECK_ERROR_Config_cutRoi, // 参数的 roi 错误
CHECK_ERROR_CheckImg_Empty, // 检测 图片为空
CHECK_ERROR_PushImg_ListSize, // 送图错误 队列太长
CHECK_ERROR_PushImg_NoDetChannel, // 不检测通道
CHECK_ERROR_PushImg_Existing_ID, // ID 已存在
CHECK_ERROR_PushImg_ID_Error, // ID 错误
CHECK_ERROR_ID_Error, // ID 错误
CHECK_ERROR_L255_Empty, // L255 为空
CHECK_ERROR_L255_Edge_Fail, // L255 边界搜索失败
CHECK_ERROR_PRODUCT_ID_EXIST, // 产品 ID 已存在
CHECK_ERROR_Camear_ID_Error, // 相机ID 错误
INIT_CameraCheck_Error, // 初始化 相机处理类错误
};
static const std::string str_ErrorName[] =
{
"ok",
"ERROR_VERSION",
"Config_Null",
"Config_Value",
"Path_NULL",
"Mask_Empty",
"Config_cutRoi",
"CheckImg_Empty",
"PushImg_ListSize",
"PushImg_NoDetChannel",
"PushImg_Existing_ID",
"PushImg_ID_Error",
"ID_Error",
"L255_Empty",
"L255_Edge_Fail",
"L255_Empty",
"L255_Empty",
"PRODUCT_ID_EXIST",
"Camear_ID_Error",
"INIT_CameraCheck_Error"};
struct ErrorInfo
{
int nerror_code; // 错误代码
string strerror_msg; // 错误信息
ErrorInfo()
{
Init();
}
void Init()
{
nerror_code = CHECK_OK;
strerror_msg = str_ErrorName[CHECK_OK];
}
};
#endif