aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
authorMelanie2011-06-09 02:05:04 +0100
committerMelanie2011-06-09 02:05:04 +0100
commit326c46ba70cea70ddfe4aef9a6b73edff63e126a (patch)
tree5e76347b0d77f58717d8e5e4f3b8787ff01a18d7 /OpenSim/Region/Framework/Scenes/Serialization
parentMake the last otem in a list created with llCSV2List findable (diff)
parentConsistency fix on the last commit. (diff)
downloadopensim-SC_OLD-326c46ba70cea70ddfe4aef9a6b73edff63e126a.zip
opensim-SC_OLD-326c46ba70cea70ddfe4aef9a6b73edff63e126a.tar.gz
opensim-SC_OLD-326c46ba70cea70ddfe4aef9a6b73edff63e126a.tar.bz2
opensim-SC_OLD-326c46ba70cea70ddfe4aef9a6b73edff63e126a.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs30
1 files changed, 25 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 95ded7f..5c284b9 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -121,7 +121,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
121 } 121 }
122 } 122 }
123 123
124
125 /// <summary> 124 /// <summary>
126 /// Serialize a scene object to the original xml format 125 /// Serialize a scene object to the original xml format
127 /// </summary> 126 /// </summary>
@@ -572,7 +571,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
572 571
573 private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) 572 private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader)
574 { 573 {
575 obj.Shape = ReadShape(reader, "Shape"); 574 bool errors = false;
575 obj.Shape = ReadShape(reader, "Shape", out errors);
576
577 if (errors)
578 m_log.DebugFormat(
579 "[SceneObjectSerializer]: Parsing PrimitiveBaseShape for object part {0} {1} encountered errors. Please see earlier log entries.",
580 obj.Name, obj.UUID);
576 } 581 }
577 582
578 private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader) 583 private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader)
@@ -1479,7 +1484,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1479 } 1484 }
1480 catch (Exception e) 1485 catch (Exception e)
1481 { 1486 {
1482 m_log.DebugFormat("[SceneObjectSerializer]: exception while parsing {0}: {1}", nodeName, e); 1487 m_log.DebugFormat(
1488 "[SceneObjectSerializer]: exception while parsing {0} in object {1} {2}: {3}{4}",
1489 obj.Name, obj.UUID, nodeName, e.Message, e.StackTrace);
1483 if (reader.NodeType == XmlNodeType.EndElement) 1490 if (reader.NodeType == XmlNodeType.EndElement)
1484 reader.Read(); 1491 reader.Read();
1485 } 1492 }
@@ -1531,8 +1538,17 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1531 return tinv; 1538 return tinv;
1532 } 1539 }
1533 1540
1534 static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name) 1541 /// <summary>
1542 /// Read a shape from xml input
1543 /// </summary>
1544 /// <param name="reader"></param>
1545 /// <param name="name">The name of the xml element containing the shape</param>
1546 /// <param name="errors">true if any errors were encountered during parsing, false otherwise</param>
1547 /// <returns>The shape parsed</returns>
1548 static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out bool errors)
1535 { 1549 {
1550 errors = false;
1551
1536 PrimitiveBaseShape shape = new PrimitiveBaseShape(); 1552 PrimitiveBaseShape shape = new PrimitiveBaseShape();
1537 1553
1538 reader.ReadStartElement(name, String.Empty); // Shape 1554 reader.ReadStartElement(name, String.Empty); // Shape
@@ -1551,7 +1567,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1551 } 1567 }
1552 catch (Exception e) 1568 catch (Exception e)
1553 { 1569 {
1554 m_log.DebugFormat("[SceneObjectSerializer]: exception while parsing Shape {0}: {1}", nodeName, e); 1570 errors = true;
1571 m_log.DebugFormat(
1572 "[SceneObjectSerializer]: exception while parsing Shape property {0}: {1}{2}",
1573 nodeName, e.Message, e.StackTrace);
1574
1555 if (reader.NodeType == XmlNodeType.EndElement) 1575 if (reader.NodeType == XmlNodeType.EndElement)
1556 reader.Read(); 1576 reader.Read();
1557 } 1577 }