浏览代码

Z991239-5712 #comment feat: 指纹仪实体异常信息上送优化

Signed-Off-By: commit-hook
刘文涛80174520 11 月之前
父节点
当前提交
3930c93cd5
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      Module/mod_FingerPrint/FingerPrintFSM.cpp

+ 8 - 3
Module/mod_FingerPrint/FingerPrintFSM.cpp

@@ -643,9 +643,9 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 			}
 #endif
 		}else{
-			CSimpleStringA addMsg = CSimpleStringA::Format("Invoke routine 'Image2Feature' fileName:%s, lpbLength:%d failed while GetFingerPrint.", fileName.GetData(), lpbLength);
-			CSimpleStringA contxtStr = CSimpleStringA::Format("{\"addition\": \"%s\"}", addMsg);
-			SetErrorAndLog(eErr, MEC_DEVAPI_FINGERPRINT_Image2Feature, "DevAdapter::Image2Feature", __FUNCTION__, false, l_endTime - l_beginTime, "", contxtStr.GetData());
+			DevErrorInfo devErrInfo;
+			m_hDevHelper->GetLastErr(devErrInfo);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER)("Invoke routine 'Image2Feature' fileName:%s, lpbLength:%d failed which returned 0x%x(%s) while GetFingerPrint.", fileName.GetData(), lpbLength, eErr, devErrInfo.szErrMsg);
 		}
 		dwEnd = SP::Module::Comm::RVCGetTickCount();
 		elapsed = dwEnd - dwStart;
@@ -670,6 +670,11 @@ int CFingerPrintFSM::GetFingerPrint(SpReqAnsContext<FingerPrintService_GetFinger
 		ctx->Answer(Error_Succeed);
 	}
 	else if(elapsed >= FINGERPRINT_SCAN_TIMEOUT){
+
+		CSimpleStringA addMsg = CSimpleStringA::Format("Invoke routine 'Image2Feature' fileName:%s, lpbLength:%d failed while GetFingerPrint.", fileName.GetData(), lpbLength);
+		CSimpleStringA contxtStr = CSimpleStringA::Format("{\"addition\": \"%s\"}", addMsg);
+		SetErrorAndLog(eErr, MEC_DEVAPI_FINGERPRINT_Image2Feature, "DevAdapter::Image2Feature", __FUNCTION__, false, l_endTime - l_beginTime, "", contxtStr.GetData());
+
 		m_bCancelRegister = false;
 		ctx->Ans.reserved1[0] = 2;
 		if (bIsRegister) {