aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
diff options
context:
space:
mode:
authorJeff Ames2007-11-17 05:53:12 +0000
committerJeff Ames2007-11-17 05:53:12 +0000
commit946db5461c8262d3b957e42ed7a90feb447c618b (patch)
tree7ba5a76429f19881d684a9c317210f39e4cc70b1 /OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
parentfixed svn:ignore on POSPlugin (diff)
downloadopensim-SC-946db5461c8262d3b957e42ed7a90feb447c618b.zip
opensim-SC-946db5461c8262d3b957e42ed7a90feb447c618b.tar.gz
opensim-SC-946db5461c8262d3b957e42ed7a90feb447c618b.tar.bz2
opensim-SC-946db5461c8262d3b957e42ed7a90feb447c618b.tar.xz
catch exceptions when loading malformed xml files
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 765c42e..05caa84 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -27,8 +27,10 @@
27*/ 27*/
28 28
29using System.IO; 29using System.IO;
30using System.Xml;
30using libsecondlife; 31using libsecondlife;
31using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework.Console;
32 34
33namespace OpenSim.Framework.Communications.Cache 35namespace OpenSim.Framework.Communications.Cache
34{ 36{
@@ -65,8 +67,15 @@ namespace OpenSim.Framework.Communications.Cache
65 string filePath = Path.Combine(Util.configDir(), "OpenSimLibrary.xml"); 67 string filePath = Path.Combine(Util.configDir(), "OpenSimLibrary.xml");
66 if (File.Exists(filePath)) 68 if (File.Exists(filePath))
67 { 69 {
68 XmlConfigSource source = new XmlConfigSource(filePath); 70 try
69 ReadItemsFromFile(source); 71 {
72 XmlConfigSource source = new XmlConfigSource(filePath);
73 ReadItemsFromFile(source);
74 }
75 catch (XmlException e)
76 {
77 MainLog.Instance.Error("INVENTORY", "Error loading " + filePath + ": " + e.ToString());
78 }
70 } 79 }
71 } 80 }
72 81