This commit is contained in:
Kathy Ruffing 2010-11-23 14:52:55 +00:00
parent bd4ec5d510
commit 8867e61255

View File

@ -52,13 +52,13 @@ namespace VEPROMS
// MyDocuments: C:\Users\Kathy.VOLIAN0\Documents
// The error log is created using log4Net. The variables that were tested were:
// <param name="File" value="${USERPROFILE}/My Documents/VE-PROMS/ErrorLog.txt" /> - puts in document directory
// <param name="File" value="${USERPROFILE}/My Documents/VEPROMS/ErrorLog.txt" /> - puts in document directory
// <param name="File" value="${APPDATA}/Volian/Proms2010/ErrorLog.txt" /> - puts in roaming directory
// <param name="File" value="${LOCALAPPDATA}/Temp/VE-PROMS/ErrorLog.txt" /> - Vista - puts in local directory. !Exist for XP
// <param name="File" value="${LOCALAPPDATA}/Temp/VEPROMS/ErrorLog.txt" /> - Vista - puts in local directory. !Exist for XP
// Decided to use 'documents directory' for error log file so that it is easily accessible by user:
string dpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VE-PROMS\ErrorLog.txt";
_log.Error("PROMS2010 Main ThreadException", e.Exception);
string dpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\ErrorLog.txt";
_log.Error("Proms Main ThreadException", e.Exception);
string msg = string.Format("An error has occurred so the program will terminate. Please send the error log, {0}, to Volian.", dpath);
MessageBox.Show(msg);
Application.Exit();