X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fnet%2Fsf%2Fopenrocket%2Fmotor%2FMotor.java;fp=src%2Fnet%2Fsf%2Fopenrocket%2Fmotor%2FMotor.java;h=7d3be842fba2f055f3211843e92d6a4b847ac9c2;hb=c72e1c03cc0d15e11368707c38721d506ce356b9;hp=ce746d332ab24b434557bd1f28f8fb14ffdb0c77;hpb=d23932f311312abb73801262a80ef2f6bc66818d;p=debian%2Fopenrocket diff --git a/src/net/sf/openrocket/motor/Motor.java b/src/net/sf/openrocket/motor/Motor.java index ce746d33..7d3be842 100644 --- a/src/net/sf/openrocket/motor/Motor.java +++ b/src/net/sf/openrocket/motor/Motor.java @@ -6,6 +6,7 @@ import java.util.Locale; import java.util.regex.Matcher; import java.util.regex.Pattern; +import net.sf.openrocket.util.BugException; import net.sf.openrocket.util.Coordinate; import net.sf.openrocket.util.MathUtil; @@ -282,7 +283,7 @@ public abstract class Motor implements Comparable { avgTime *= time/(DIVISIONS+1); if (Double.isNaN(avgTime)) - throw new RuntimeException("Calculated avg. time is NaN for motor "+this); + throw new BugException("Calculated avg. time is NaN for motor "+this); } return avgTime; @@ -315,7 +316,7 @@ public abstract class Motor implements Comparable { avgThrust /= points; if (Double.isNaN(avgThrust)) - throw new RuntimeException("Calculated average thrust is NaN for motor "+this); + throw new BugException("Calculated average thrust is NaN for motor "+this); } return avgThrust; } @@ -346,7 +347,7 @@ public abstract class Motor implements Comparable { } if (Double.isNaN(totalImpulse)) - throw new RuntimeException("Calculated total impulse is NaN for motor "+this); + throw new BugException("Calculated total impulse is NaN for motor "+this); } return totalImpulse; }