Added some exception handling to help catch some possibly corrupt prims

0.6.0-stable
Dahlia Trimble 2008-08-27 07:30:14 +00:00
parent 3481a977f0
commit cf951d4d04
1 changed files with 22 additions and 2 deletions

View File

@ -1926,7 +1926,17 @@ namespace OpenSim.Region.Physics.Meshing
#if SPAM #if SPAM
Console.WriteLine("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString()); Console.WriteLine("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString());
#endif #endif
primMesh.ExtrudeLinear(); try
{
primMesh.ExtrudeLinear();
}
catch (Exception ex)
{
Console.WriteLine("Extrusion failure: exception: " + ex.ToString());
Console.WriteLine("\n Prim Name: " + primName);
Console.WriteLine("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString());
return null;
}
} }
else else
{ {
@ -1943,7 +1953,17 @@ namespace OpenSim.Region.Physics.Meshing
#if SPAM #if SPAM
Console.WriteLine("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString()); Console.WriteLine("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString());
#endif #endif
primMesh.ExtrudeCircular(); try
{
primMesh.ExtrudeCircular();
}
catch (Exception ex)
{
Console.WriteLine("Extrusion failure: exception: " + ex.ToString());
Console.WriteLine("\n Prim Name: " + primName);
Console.WriteLine("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString());
return null;
}
} }
primMesh.DumpRaw(baseDir, primName, "primMesh"); primMesh.DumpRaw(baseDir, primName, "primMesh");