Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.WinForms
changeset 73:12f11e3c6261
Re #178: "crash" when loading old .army file with equipment tags that are "old"
* Catch the "Required Data Missing" exception that is thrown by loading armies and display a message box
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 28 Sep 2009 19:50:16 +0000 |
parents | 9a215113c84c |
children | f1b7a08a8f6f |
files | FrmMain.cs |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/FrmMain.cs Mon Sep 28 19:40:50 2009 +0000 +++ b/FrmMain.cs Mon Sep 28 19:50:16 2009 +0000 @@ -606,6 +606,12 @@ loadedFilePath = newFilePath; return true; } + catch (RequiredDataMissingException ex) + { + log.Error(ex); + MessageBox.Show(this, ex.Message, Translation.GetTranslation("InvalidFileBoxTitle", "Invalid army file"), MessageBoxButtons.OK, MessageBoxIcon.Error); + return false; + } catch (InvalidFileException ex) { log.Error(ex);