changeset 23:fb4fdab841db

* Ignore schema location attribute for translations * Make sure exceptions get passed as exceptions to log notify listeners if they were passed as the only parameter no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sat, 14 Mar 2009 20:12:29 +0000
parents ea058f9ea9d4
children 5cbf8bbf9b05
files Lang/Translation.cs Logging/LogNotifier.cs
diffstat 2 files changed, 42 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Lang/Translation.cs	Sat Mar 07 15:52:27 2009 +0000
+++ b/Lang/Translation.cs	Sat Mar 14 20:12:29 2009 +0000
@@ -110,7 +110,7 @@
 					settings = new XmlReaderSettings();
 					settings.XmlResolver = new IBBXmlResolver(translationDir.Parent.FullName);
 					settings.ValidationType = ValidationType.Schema;
-					settings.ValidationFlags = XmlSchemaValidationFlags.ReportValidationWarnings | XmlSchemaValidationFlags.ProcessSchemaLocation;
+					settings.ValidationFlags = XmlSchemaValidationFlags.ReportValidationWarnings;
 					settings.ValidationEventHandler+= new ValidationEventHandler(ValidationEventMethod);
 					XmlSchemaSet cache = new XmlSchemaSet();
 					cache.Add("http://ibboard.co.uk/translation", translationDir.Parent.FullName + "/dtds/translation.xsd");
--- a/Logging/LogNotifier.cs	Sat Mar 07 15:52:27 2009 +0000
+++ b/Logging/LogNotifier.cs	Sat Mar 14 20:12:29 2009 +0000
@@ -23,7 +23,14 @@
 		
 		public static void Debug(Type logFromType, Object message)
 		{
-			Debug(logFromType, message, null);
+			if (message is Exception)
+			{
+				Debug(logFromType, "", (Exception)message);
+			}
+			else
+			{
+				Debug(logFromType, message, null);
+			}
 		}
 		
 		public static void Debug(Type logFromType, Object message, Exception e)
@@ -41,7 +48,14 @@
 		
 		public static void Info(Type logFromType, Object message)
 		{
-			Info(logFromType, message, null);
+			if (message is Exception)
+			{
+				Info(logFromType, "", (Exception)message);
+			}
+			else
+			{
+				Info(logFromType, message, null);
+			}
 		}
 		
 		public static void Info(Type logFromType, Object message, Exception e)
@@ -59,7 +73,14 @@
 		
 		public static void Warn(Type logFromType, Object message)
 		{
-			Warn(logFromType, message, null);
+			if (message is Exception)
+			{
+				Warn(logFromType, "", (Exception)message);
+			}
+			else
+			{
+				Warn(logFromType, message, null);
+			}
 		}
 		
 		public static void Warn(Type logFromType, Object message, Exception e)
@@ -76,8 +97,15 @@
 		}
 		
 		public static void Error(Type logFromType, Object message)
-		{
-			Error(logFromType, message, null);
+		{	
+			if (message is Exception)
+			{
+				Error(logFromType, "", (Exception)message);
+			}
+			else
+			{
+				Error(logFromType, message, null);
+			}
 		}
 		
 		public static void Error(Type logFromType, Object message, Exception e)
@@ -95,7 +123,14 @@
 		
 		public static void Fatal(Type logFromType, Object message)
 		{
-			Fatal(logFromType, message, null);
+			if (message is Exception)
+			{
+				Fatal(logFromType, "", (Exception)message);
+			}
+			else
+			{
+				Fatal(logFromType, message, null);
+			}
 		}
 		
 		public static void Fatal(Type logFromType, Object message, Exception e)