diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index bb8a83a..0440c99 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -565,7 +565,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
565 | 565 | ||
566 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) | 566 | private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) |
567 | { | 567 | { |
568 | obj.Shape = ReadShape(reader, "Shape"); | 568 | bool errors = false; |
569 | obj.Shape = ReadShape(reader, "Shape", out errors); | ||
570 | |||
571 | if (errors) | ||
572 | m_log.DebugFormat( | ||
573 | "[SceneObjectSerializer]: Parsing PrimitiveBaseShape for object part {0} {1} encountered errors. Please see earlier log entries.", | ||
574 | obj.Name, obj.UUID); | ||
569 | } | 575 | } |
570 | 576 | ||
571 | private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader) | 577 | private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader) |
@@ -1435,7 +1441,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1435 | } | 1441 | } |
1436 | catch (Exception e) | 1442 | catch (Exception e) |
1437 | { | 1443 | { |
1438 | m_log.DebugFormat("[SceneObjectSerializer]: exception while parsing {0}: {1}", nodeName, e); | 1444 | m_log.DebugFormat( |
1445 | "[SceneObjectSerializer]: exception while parsing {0} in object {1} {2}: {3}{4}", | ||
1446 | obj.Name, obj.UUID, nodeName, e.Message, e.StackTrace); | ||
1439 | if (reader.NodeType == XmlNodeType.EndElement) | 1447 | if (reader.NodeType == XmlNodeType.EndElement) |
1440 | reader.Read(); | 1448 | reader.Read(); |
1441 | } | 1449 | } |
@@ -1493,8 +1501,17 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1493 | return tinv; | 1501 | return tinv; |
1494 | } | 1502 | } |
1495 | 1503 | ||
1496 | static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name) | 1504 | /// <summary> |
1505 | /// Read a shape from xml input | ||
1506 | /// </summary> | ||
1507 | /// <param name="reader"></param> | ||
1508 | /// <param name="name">The name of the xml element containing the shape</param> | ||
1509 | /// <param name="errors">true if any errors were encountered during parsing, false otherwise</param> | ||
1510 | /// <returns>The shape parsed</returns> | ||
1511 | static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out bool errors) | ||
1497 | { | 1512 | { |
1513 | errors = false; | ||
1514 | |||
1498 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); | 1515 | PrimitiveBaseShape shape = new PrimitiveBaseShape(); |
1499 | 1516 | ||
1500 | if (reader.IsEmptyElement) | 1517 | if (reader.IsEmptyElement) |
@@ -1519,7 +1536,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1519 | } | 1536 | } |
1520 | catch (Exception e) | 1537 | catch (Exception e) |
1521 | { | 1538 | { |
1522 | m_log.DebugFormat("[SceneObjectSerializer]: exception while parsing Shape {0}: {1}", nodeName, e); | 1539 | errors = true; |
1540 | m_log.DebugFormat( | ||
1541 | "[SceneObjectSerializer]: exception while parsing Shape property {0}: {1}{2}", | ||
1542 | nodeName, e.Message, e.StackTrace); | ||
1543 | |||
1523 | if (reader.NodeType == XmlNodeType.EndElement) | 1544 | if (reader.NodeType == XmlNodeType.EndElement) |
1524 | reader.Read(); | 1545 | reader.Read(); |
1525 | } | 1546 | } |