Forward the underlying error message when an exception is triggered.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1371671 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2012-08-10 11:59:20 +00:00
parent 746c998e1a
commit f2fe724505
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import java.util.concurrent.Callable;
import org.apache.commons.math3.stat.descriptive.SummaryStatistics;
import org.apache.commons.math3.stat.descriptive.StatisticalSummary;
import org.apache.commons.math3.exception.MathIllegalStateException;
import org.apache.commons.math3.exception.util.LocalizedFormats;
/**
* Simple benchmarking utilities.
@ -126,7 +127,7 @@ public class PerfTestUtils {
}
} catch (Exception e) {
// Abort benchmarking if codes throw exceptions.
throw new MathIllegalStateException();
throw new MathIllegalStateException(LocalizedFormats.SIMPLE_MESSAGE, e.getMessage());
}
final double normFactor = 1d / repeatChunk;