diff --git a/src/main/java/org/apache/commons/math/linear/SingularValueDecompositionImpl.java b/src/main/java/org/apache/commons/math/linear/SingularValueDecompositionImpl.java index 1c5082857..e0d50ce92 100644 --- a/src/main/java/org/apache/commons/math/linear/SingularValueDecompositionImpl.java +++ b/src/main/java/org/apache/commons/math/linear/SingularValueDecompositionImpl.java @@ -17,7 +17,7 @@ package org.apache.commons.math.linear; -import org.apache.commons.math.MathRuntimeException; +import org.apache.commons.math.exception.NumberIsTooLargeException; import org.apache.commons.math.exception.util.LocalizedFormats; import org.apache.commons.math.util.FastMath; @@ -192,9 +192,8 @@ public class SingularValueDecompositionImpl implements SingularValueDecompositio } if (dimension == 0) { - throw MathRuntimeException.createIllegalArgumentException( - LocalizedFormats.TOO_LARGE_CUTOFF_SINGULAR_VALUE, - minSingularValue, singularValues[0]); + throw new NumberIsTooLargeException(LocalizedFormats.TOO_LARGE_CUTOFF_SINGULAR_VALUE, + minSingularValue, singularValues[0], true); } final double[][] data = new double[dimension][p];