Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.WinForms
changeset 249:c50dc3c4136e
Re #425: FileLoadFailure when starting WarFoundry
* Try getting more debug information out of the class
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 26 Aug 2012 11:19:32 +0100 |
parents | 425912324be5 |
children | 3aacaa74587f |
files | FrmMain.cs |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/FrmMain.cs Sat May 19 20:16:21 2012 +0100 +++ b/FrmMain.cs Sun Aug 26 11:19:32 2012 +0100 @@ -31,6 +31,7 @@ using IBBoard.WarFoundry.API.Savers.Xml; using IBBoard.WarFoundry.API.Factories; using IBBoard.WarFoundry.API.Factories.Xml; +using System.Reflection; namespace IBBoard.WarFoundry.GUI.WinForms { @@ -659,7 +660,16 @@ { foreach (FileLoadFailure failure in failures) { - log.Warn("Failed to load " + failure.FailedFile.FullName + ": " + failure.Message); + log.DebugFormat("Got failure of type {0}", failure.FailedFile.GetType().Name); + foreach (MethodInfo method in failure.FailedFile.GetType().GetMethods()) + { + log.DebugFormat(" Got method {0} {1} {2}", method.IsPrivate ? "private" : "public", method.ReturnType.Name, method.Name); + } + foreach (PropertyInfo property in failure.FailedFile.GetType().GetProperties()) + { + log.DebugFormat(" Got property {0} {1}", property.PropertyType.Name, property.Name); + } + log.WarnFormat("Failed to load {0}: {1}", failure.FailedFile.Name, failure.Message); } }