The error message box now shows the exact file name of the error file

This commit is contained in:
John Jenko 2013-01-28 16:31:31 +00:00
parent 58a3e79f3b
commit 49cc4aa1ca

View File

@ -57,7 +57,9 @@ namespace VEPROMS
// <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) + @"\VEPROMS\ErrorLog.txt";
string dpath = frmVEPROMS.ErrorLogFileName;
if (dpath == null || dpath == "")
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);