Reformating charting, add DataError message
This commit is contained in:
@@ -29,8 +29,16 @@ namespace LeafWeb.Core.Charter
|
||||
foreach (var comparisonGroup in comparisonGroups)
|
||||
{
|
||||
if (comparisonGroup.FitType.Count() != 4)
|
||||
throw new ArgumentException(
|
||||
$"{comparisonGroup.CurveID} should have 4 data sets, only has {comparisonGroup.FitType.Count()}");
|
||||
{
|
||||
var missing =
|
||||
from rwp in new[] {true, false}
|
||||
from gamma in new [] {true, false}
|
||||
where !comparisonGroup.FitType.Any(ft => ft.FitRwp == rwp && ft.FitGammaStar == gamma)
|
||||
select $"(FitRwp: {(rwp ? "yes" : "no")}, FitGamma*: {(gamma ? "yes" : "no")})";
|
||||
throw new ParseException(
|
||||
$"Curve data in '{comparisonGroup.CurveID}' requires data sets representing all combinations of FitRwp and FitGamma."
|
||||
+ " Combinations missing are: " + string.Join(", ", missing));
|
||||
}
|
||||
|
||||
var curveData = new CurveData {CurveId = comparisonGroup.CurveID};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user