From 65c82c2494cd639e9cae5bfece11cec3e10000e2 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Wed, 27 Aug 2008 08:03:52 +0000 Subject: Added some exception trapping to PrimMesher --- OpenSim/Region/Physics/Meshing/PrimMesher.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index 168a3bb..1e4efcb 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs @@ -191,15 +191,29 @@ namespace OpenSim.Region.Physics.Meshing float startAngle = profileStart * twoPi; float stopAngle = profileEnd * twoPi; float stepSize = twoPi / sides; - - angles.makeAngles(sides, startAngle, stopAngle); + + try { angles.makeAngles(sides, startAngle, stopAngle); } + catch (Exception ex) + { + Console.WriteLine("makeAngles failed: Exception: " + ex.ToString()); + Console.WriteLine("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString()); + return; + } if (hollow > 0.001f) { if (sides == hollowSides) hollowAngles = angles; else - hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); + { + try { hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); } + catch (Exception ex) + { + Console.WriteLine("makeAngles failed: Exception: " + ex.ToString()); + Console.WriteLine("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString()); + return; + } + } } else this.coords.Add(center); -- cgit v1.1