B2019-107 Added Error Handling for missing Config field

This commit is contained in:
Rich 2019-08-06 19:37:18 +00:00
parent 04d3770f40
commit 626fc866a0

View File

@ -332,8 +332,9 @@ namespace VEPROMS
// D2017-260 - Use a prefix of the server name combined with the database name for temporary MSWord sections // D2017-260 - Use a prefix of the server name combined with the database name for temporary MSWord sections
DSOFile.TempFilePrefix = System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.Regex.Replace(c, @"([^[\]]*) \[.*\]", "$1"), @"[\#\~\%\@\[\]\(\)\{\}\-. \\*<>:;""/?|]+", "_"); DSOFile.TempFilePrefix = System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.Regex.Replace(c, @"([^[\]]*) \[.*\]", "$1"), @"[\#\~\%\@\[\]\(\)\{\}\-. \\*<>:;""/?|]+", "_");
ChangeLogFileName("LogFileAppender", Database.ActiveDatabase + " " + dtSunday.ToString("yyyyMMdd") + " ErrorLog.txt"); ChangeLogFileName("LogFileAppender", Database.ActiveDatabase + " " + dtSunday.ToString("yyyyMMdd") + " ErrorLog.txt");
_MyLog.InfoFormat("\r\nSession Beginning\r\n<===={0}[SQL:{1:yyMM.ddHH}]====== User: {2}/{3} Started {4} ===============>" // B2019-107 Error Log message for inconsistent PromsFixes
, Application.ProductVersion,Database.RevDate, Environment.UserDomainName,Environment.UserName, DateTime.Now.ToString("dddd MMMM d, yyyy h:mm:ss tt")); _MyLog.InfoFormat("\r\nSession Beginning\r\n<===={0}[SQL:{1:yyMM.ddHH}]====== User: {2}/{3} Started {4} ===============>{5}"
, Application.ProductVersion,Database.RevDate, Environment.UserDomainName,Environment.UserName, DateTime.Now.ToString("dddd MMMM d, yyyy h:mm:ss tt"), FormatInfo.Failed ?? "");
foreach (string parameter in parameters) foreach (string parameter in parameters)
{ {
if (parameter.ToUpper().StartsWith("/UF=")) if (parameter.ToUpper().StartsWith("/UF="))