Added some exception trapping to PrimMesher

0.6.0-stable
Dahlia Trimble 2008-08-27 08:03:52 +00:00
parent cf951d4d04
commit 65c82c2494
1 changed files with 17 additions and 3 deletions

View File

@ -192,14 +192,28 @@ namespace OpenSim.Region.Physics.Meshing
float stopAngle = profileEnd * twoPi; float stopAngle = profileEnd * twoPi;
float stepSize = twoPi / sides; 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 (hollow > 0.001f)
{ {
if (sides == hollowSides) if (sides == hollowSides)
hollowAngles = angles; hollowAngles = angles;
else 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 else
this.coords.Add(center); this.coords.Add(center);