VeraCode已在try块关闭括号中为以下代码提供高优先级问题。
public string GenerateExcelFilePath(string strFileName)
{
string strExcelFileFullFilePath = string.Empty;
string strFolderName = string.Empty;
ExcelGeneration objExcelFile = null;
UserImpersonation objUserImpersonation = null;
try
{
strFolderName = "Excel Files";
objExcelFile = new ExcelGeneration();
objUserImpersonation = new UserImpersonation();
objUserImpersonation.impersonateUser(DACommon.Shared_UserName, DACommon.Shared_Domain, DACommon.Shared_Password);
// Use Path.Combine
strExcelFileFullFilePath = objExcelFile.GetExcelFilePath(strFileName, strFolderName);
strExcelFileFullFilePath = HttpUtility.UrlDecode(strExcelFileFullFilePath, System.Text.Encoding.Default);
// IF file exists,delete the file
objExcelFile.CheckIsFileExists(strExcelFileFullFilePath);
}
catch (Exception ex)
{
Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
throw ex;
}
return strExcelFileFullFilePath;
}