From 49cc4aa1cac5b288b0afe2c307eb59304f308c7b Mon Sep 17 00:00:00 2001 From: John Date: Mon, 28 Jan 2013 16:31:31 +0000 Subject: [PATCH] The error message box now shows the exact file name of the error file --- PROMS/VEPROMS User Interface/Program.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS User Interface/Program.cs b/PROMS/VEPROMS User Interface/Program.cs index c6599484..811046c4 100644 --- a/PROMS/VEPROMS User Interface/Program.cs +++ b/PROMS/VEPROMS User Interface/Program.cs @@ -57,9 +57,11 @@ namespace VEPROMS // - 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); + 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(); }