changeset 20:b7c93a5821cd

* Remove unnecessary project dependency * Change logging on invalid file exception on load * Add logging when a non-native loader is asked to load a file it doesn't understand no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sun, 01 Mar 2009 15:00:03 +0000
parents 57451981545c
children 1e18de815472
files IBBoard.WarFoundry.API.csproj api/Factories/AbstractNonNativeFileExtensionWarFoundryFactory.cs api/WarFoundryLoader.cs
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/IBBoard.WarFoundry.API.csproj	Sat Feb 21 14:39:15 2009 +0000
+++ b/IBBoard.WarFoundry.API.csproj	Sun Mar 01 15:00:03 2009 +0000
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -121,10 +121,6 @@
       <Project>{5DFD64F6-FC2B-4B4F-B92E-483BAC468105}</Project>
       <Name>IBBoard</Name>
     </ProjectReference>
-    <ProjectReference Include="..\IBBoard.Log4Net\IBBoard.Log4Net.csproj">
-      <Project>{DCBA3FB1-267A-4D89-955B-5C05785EE1CD}</Project>
-      <Name>IBBoard.Log4Net</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <Reference Include="System.Xml" />
--- a/api/Factories/AbstractNonNativeFileExtensionWarFoundryFactory.cs	Sat Feb 21 14:39:15 2009 +0000
+++ b/api/Factories/AbstractNonNativeFileExtensionWarFoundryFactory.cs	Sun Mar 01 15:00:03 2009 +0000
@@ -5,6 +5,7 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using IBBoard.Logging;
 using IBBoard.WarFoundry.API.Objects;
 
 namespace IBBoard.WarFoundry.API.Factories
@@ -60,6 +61,10 @@
 			{
 				objects.Add(CreateArmyFromFile(file));
 			}
+			else
+			{
+				LogNotifier.Warn(GetType(), "Failed trying to create from "+file.FullName+" - not a Race, Army or GameSystem");
+			}
 			
 			return objects;
 		}
--- a/api/WarFoundryLoader.cs	Sat Feb 21 14:39:15 2009 +0000
+++ b/api/WarFoundryLoader.cs	Sun Mar 01 15:00:03 2009 +0000
@@ -359,7 +359,7 @@
 			}
 			catch (InvalidFileException ex)
 			{
-				LogNotifier.Error(GetType(), file.FullName+" failed to load: "+ex.Message);
+				LogNotifier.Error(GetType(), file.FullName+" failed to load", ex);
 			}
 				
 			if (objs!=null)
@@ -368,7 +368,6 @@
 			}
 			else
 			{
-				LogNotifier.Debug(GetType(), "Could not load "+file.FullName);
 				objs = new List<IWarFoundryObject>();
 			}