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

@ -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);