From cf951d4d04129de7b42ff6df64af2bcc4f7656da Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Wed, 27 Aug 2008 07:30:14 +0000 Subject: Added some exception handling to help catch some possibly corrupt prims --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 06df4ca..4b2fb16 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -1926,7 +1926,17 @@ namespace OpenSim.Region.Physics.Meshing #if SPAM Console.WriteLine("****** PrimMesh Parameters (Linear) ******\n" + primMesh.ParamsToDisplayString()); #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 { @@ -1943,7 +1953,17 @@ namespace OpenSim.Region.Physics.Meshing #if SPAM Console.WriteLine("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString()); #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"); -- cgit v1.1