* Debugging some inventory related NullRefException's.
parent
53a350573e
commit
2d4166fecf
|
@ -65,6 +65,8 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
writer.WriteStartElement(String.Empty, "map", String.Empty);
|
writer.WriteStartElement(String.Empty, "map", String.Empty);
|
||||||
FieldInfo[] fields = myType.GetFields();
|
FieldInfo[] fields = myType.GetFields();
|
||||||
for (int i = 0; i < fields.Length; i++)
|
for (int i = 0; i < fields.Length; i++)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
object fieldValue = fields[i].GetValue(obj);
|
object fieldValue = fields[i].GetValue(obj);
|
||||||
LLSDType[] fieldAttributes =
|
LLSDType[] fieldAttributes =
|
||||||
|
@ -89,6 +91,13 @@ namespace OpenSim.Framework.Communications.Capabilities
|
||||||
// OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
|
// OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
|
||||||
// writer, OpenMetaverse.StructuredData.OSD.FromObject(fieldValue));
|
// writer, OpenMetaverse.StructuredData.OSD.FromObject(fieldValue));
|
||||||
}
|
}
|
||||||
|
} catch(NullReferenceException e)
|
||||||
|
{
|
||||||
|
System.Console.WriteLine("-----------NRE-------------");
|
||||||
|
System.Console.WriteLine("Type: " + fields[i].GetValue(obj).GetType().FullName);
|
||||||
|
System.Console.WriteLine("-----------NRE-------------");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue