diff options
author | Jeff Ames | 2007-11-17 05:53:12 +0000 |
---|---|---|
committer | Jeff Ames | 2007-11-17 05:53:12 +0000 |
commit | 946db5461c8262d3b957e42ed7a90feb447c618b (patch) | |
tree | 7ba5a76429f19881d684a9c317210f39e4cc70b1 /OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | |
parent | fixed svn:ignore on POSPlugin (diff) | |
download | opensim-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.cs | 13 |
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 | ||
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Xml; | ||
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenSim.Framework.Console; | ||
32 | 34 | ||
33 | namespace OpenSim.Framework.Communications.Cache | 35 | namespace 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 | ||