|
@@ -1620,6 +1620,17 @@ ErrorCodeEnum IDCerClassImpl::QueryCardPos(int &pos)
|
|
|
//Private
|
|
|
void IDCerClassImpl::SaveErrorInfo(CHAR* errMsg, int errCode, const CHAR* strFunc, int nLine)
|
|
|
{
|
|
|
+
|
|
|
+ CHAR chJson[MAX_DEV_ERROR_MSG_LEN] = {0};
|
|
|
+ char chLastStr[MAX_DEV_ERROR_MSG_LEN] = {0};
|
|
|
+ int nErrCode = m_cBS_ID81IDCImpl.LastErrorCode();
|
|
|
+ m_cBS_ID81IDCImpl.LastErrorStr(chLastStr);
|
|
|
+ sprintf(chJson, "Func:%s,Line:%d,Msg:[%d]%s, %s", strFunc, nLine, nErrCode, chLastStr, errMsg);
|
|
|
+ memset(m_szErrMsg, 0, MAX_DEV_ERROR_MSG_LEN);
|
|
|
+ sprintf(m_szErrMsg, "{\"Errcode\":%d,\"Description\":%s}", errCode,chJson);
|
|
|
+ LogM(m_szErrMsg);
|
|
|
+ sprintf(m_szErrMsg, "{\"Errcode\":%d,\"Description\":%s}", errCode,chJson);
|
|
|
+ /*
|
|
|
CHAR chJson[MAX_DEV_ERROR_MSG_LEN] = {0};
|
|
|
QJsonObject root_Obj;
|
|
|
QJsonDocument root_Doc;
|
|
@@ -1637,6 +1648,7 @@ void IDCerClassImpl::SaveErrorInfo(CHAR* errMsg, int errCode, const CHAR* strFun
|
|
|
memset(m_szErrMsg, 0, MAX_DEV_ERROR_MSG_LEN);
|
|
|
sprintf(m_szErrMsg, strJson.toUtf8().data());
|
|
|
LogM(m_szErrMsg);
|
|
|
+ */
|
|
|
}
|
|
|
|
|
|
void IDCerClassImpl::SaveErrorInfo(int nLine, const char* chFunction)
|
|
@@ -1771,6 +1783,11 @@ void IDCerClassImpl::SaveErrorInfo(int nLine, const char* chFunction)
|
|
|
sprintf(chJson, "Func:%s,Line:%d,Msg:[%d]%s, %s", chFunction, nLine, nErrCode, chLastStr, "通讯异常");
|
|
|
break;
|
|
|
}
|
|
|
+ sprintf(m_szErrMsg, "{\"Errcode\":%d,\"Description\":%s}", shErrCode,chJson);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /*
|
|
|
try
|
|
|
{
|
|
|
QJsonObject root_Obj;
|
|
@@ -1790,6 +1807,7 @@ void IDCerClassImpl::SaveErrorInfo(int nLine, const char* chFunction)
|
|
|
sprintf(m_szErrMsg, "{\"Errcode\":%d,\"Description\":%s}", shErrCode,chJson);
|
|
|
}
|
|
|
LogM(m_szErrMsg);
|
|
|
+ */
|
|
|
}
|
|
|
|
|
|
int IDCerClassImpl::string_format(std::string &str, const std::string fmt, ...)
|