# HG changeset patch # User IBBoard # Date 1256396436 0 # Node ID c1caf467dd40e41ef02bd86ca7bcee2a96b2a4f2 # Parent ca2cd24f687296e0c8196d14065444dd7db0c06b Re #193: Unhandled exception in dictionary? * Make defaultStats attribute required by schema Also: * Remove some references to log notifier diff -r ca2cd24f6872 -r c1caf467dd40 api/Factories/Xml/WarFoundryXmlFactoryUtils.cs --- a/api/Factories/Xml/WarFoundryXmlFactoryUtils.cs Sat Oct 24 14:01:50 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlFactoryUtils.cs Sat Oct 24 15:00:36 2009 +0000 @@ -6,7 +6,6 @@ using System.IO; using System.Xml; using System.Xml.Schema; -using IBBoard.Logging; using IBBoard.WarFoundry.API.Objects; namespace IBBoard.WarFoundry.API.Factories.Xml @@ -92,15 +91,15 @@ } catch (IOException ex) { - LogNotifier.Warn(typeof(WarFoundryXmlFactoryUtils), "Problem reading schema: " + ex.Message, ex); + //TODO: Warn on schema failure } catch (XmlSchemaException ex) { - LogNotifier.Warn(typeof(WarFoundryXmlFactoryUtils), "Problem validating schema for WarFoundry data: " + ex.Message, ex); + //TODO: Warn on schema failure } catch (XmlException ex) { - LogNotifier.Warn(typeof(WarFoundryXmlFactoryUtils), "Problem reading data for schema: " + ex.Message, ex); + //TODO: Warn on schema failure } } @@ -128,12 +127,10 @@ if (obj.IsFullyLoaded) { - LogNotifier.DebugFormat(typeof(WarFoundryXmlFactoryUtils), "Object of type {0} with ID {1} is already fully loaded", obj.GetType().Name, obj.ID); canLoad = false; } else if (obj.IsLoading) { - LogNotifier.WarnFormat(typeof(WarFoundryXmlFactoryUtils), "Object of type {0} with ID {1} is already being loaded", obj.GetType().Name, obj.ID); canLoad = false; } diff -r ca2cd24f6872 -r c1caf467dd40 api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs --- a/api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs Sat Oct 24 14:01:50 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlGameSystemFactory.cs Sat Oct 24 15:00:36 2009 +0000 @@ -4,9 +4,9 @@ using System; using System.Collections.Generic; +using System.IO; using System.Xml; using ICSharpCode.SharpZipLib.Zip; -using IBBoard.Logging; using IBBoard.Xml; using IBBoard.WarFoundry.API.Objects; @@ -61,10 +61,9 @@ XmlElement systemElement = WarFoundryXmlFactoryUtils.SelectSingleElement(extraData, "/system:system"); system.WarnOnError = XmlTools.GetBoolValueFromAttribute(systemElement, "warn"); system.AllowAllies = XmlTools.GetBoolValueFromAttribute(systemElement, "allowAllies"); - LogNotifier.DebugFormat(GetType(), "Completed loading of GameSystem with ID {0}", system.ID); - LogNotifier.DebugFormat(GetType(), "GameSystem with ID {0} default stats: {1}", system.ID, system.StandardSystemStatsID); system.SetAsFullyLoaded(); } + private void LoadCategoriesForSystem(GameSystem system, XmlNode elem) { diff -r ca2cd24f6872 -r c1caf467dd40 dtds/system.xsd --- a/dtds/system.xsd Sat Oct 24 14:01:50 2009 +0000 +++ b/dtds/system.xsd Sat Oct 24 15:00:36 2009 +0000 @@ -23,7 +23,7 @@ - +