Browse Source

Z991239-5810 #comment 调整拷贝失败的报错时机

oilyang 11 months ago
parent
commit
c0cce7f27c
2 changed files with 4 additions and 2 deletions
  1. 1 2
      Module/include/CommEntityUtil.hpp
  2. 3 0
      Module/mod_vtmloader/VtmLoaderFSM.cpp

+ 1 - 2
Module/include/CommEntityUtil.hpp

@@ -608,7 +608,7 @@ static bool ShellExecute(const std::string& cmd, std::string& succResult, std::s
 
 	if (exitCode != 0)
 	{
-		DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setResultCode("RTA1F08")("The program exited with code:%u", exitCode);
+		errResult = errResult + "The program exited with code:" + strerror(exitCode);
 		return false;
 	}
 
@@ -634,7 +634,6 @@ static bool ShellExecute(const std::string& cmd, std::string& succResult, std::s
 	} else {
 		sprintf(result, "popen %s error: %d", ps, errno);
 		errResult = result;
-		DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setResultCode("RTA1F08")("The program failed with errno:%d", errno);
 		return false;
 	}
 #endif //_MSC_VER

+ 3 - 0
Module/mod_vtmloader/VtmLoaderFSM.cpp

@@ -2954,7 +2954,10 @@ void CVtmLoaderFSM::CopyDepFilesToNewDepPath()
 		LogWarn(Severity_Low, Error_Succeed, VtmLoader_DepDirCopySuc, CSimpleStringA::Format("%d", ullCopyEndTick - ullCopyBeginTick));
 	}
 	else
+	{
 		m_eDepCopyStage = DepDirInitCopy_CopyFailed;
+		DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setResultCode("RTA1F08")("copy dep to new dep path failed, failedContent:%s", failedContent.c_str());
+	}
 }
 bool CVtmLoaderFSM::IfInExcludedLoadList(CSimpleStringA csEntityName)
 {