If running in Batch mode for automatic print testing, don't stop on a fatal error.

Fixed a null reference error.  If box is null don't try to update it's properties.
This commit is contained in:
Rich
2014-01-13 16:05:46 +00:00
parent ead8f91a2b
commit 581c437861
2 changed files with 3 additions and 2 deletions

View File

@@ -62,7 +62,8 @@ namespace VEPROMS
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);
if(!System.Environment.CommandLine.Contains("/P="))
MessageBox.Show(msg);
Application.Exit();
}
}