aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDahlia Trimble2008-08-27 08:03:52 +0000
committerDahlia Trimble2008-08-27 08:03:52 +0000
commit65c82c2494cd639e9cae5bfece11cec3e10000e2 (patch)
tree9e0655a09e41ef596180af6d2baa35ed633c2a8d /OpenSim/Region
parentAdded some exception handling to help catch some possibly corrupt prims (diff)
downloadopensim-SC_OLD-65c82c2494cd639e9cae5bfece11cec3e10000e2.zip
opensim-SC_OLD-65c82c2494cd639e9cae5bfece11cec3e10000e2.tar.gz
opensim-SC_OLD-65c82c2494cd639e9cae5bfece11cec3e10000e2.tar.bz2
opensim-SC_OLD-65c82c2494cd639e9cae5bfece11cec3e10000e2.tar.xz
Added some exception trapping to PrimMesher
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/Meshing/PrimMesher.cs20
1 files changed, 17 insertions, 3 deletions
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
191 float startAngle = profileStart * twoPi; 191 float startAngle = profileStart * twoPi;
192 float stopAngle = profileEnd * twoPi; 192 float stopAngle = profileEnd * twoPi;
193 float stepSize = twoPi / sides; 193 float stepSize = twoPi / sides;
194 194
195 angles.makeAngles(sides, startAngle, stopAngle); 195 try { angles.makeAngles(sides, startAngle, stopAngle); }
196 catch (Exception ex)
197 {
198 Console.WriteLine("makeAngles failed: Exception: " + ex.ToString());
199 Console.WriteLine("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
200 return;
201 }
196 202
197 if (hollow > 0.001f) 203 if (hollow > 0.001f)
198 { 204 {
199 if (sides == hollowSides) 205 if (sides == hollowSides)
200 hollowAngles = angles; 206 hollowAngles = angles;
201 else 207 else
202 hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); 208 {
209 try { hollowAngles.makeAngles(hollowSides, startAngle, stopAngle); }
210 catch (Exception ex)
211 {
212 Console.WriteLine("makeAngles failed: Exception: " + ex.ToString());
213 Console.WriteLine("sides: " + sides.ToString() + " startAngle: " + startAngle.ToString() + " stopAngle: " + stopAngle.ToString());
214 return;
215 }
216 }
203 } 217 }
204 else 218 else
205 this.coords.Add(center); 219 this.coords.Add(center);