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,8 +1926,18 @@ 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
try
{
primMesh.ExtrudeLinear(); 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
{ {
//return null; //return null;
@ -1943,8 +1953,18 @@ 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
try
{
primMesh.ExtrudeCircular(); 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");